{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Log_Book/Full_Code_With_Psedo_Data.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}29 May 2025, 11:41:52

{com}. cd "/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results"
{res}/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results

{com}. do "/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//SD50709.000000"
{txt}
{com}. 
. 
. ************************************************************************************************************
. ****** DATA AND ANALYSIS MAIN DO FILE FOR COAL BANK FINANCE PROJECT
. ************************************************************************************************************
. 
. *Install white board package
. ssc install schemepack
{txt}checking {hilite:schemepack} consistency and verifying not already installed...
all files already exist and are up to date.

{com}. 
. *************************************************************
. *************************************************************
. ************ CODE INVOLVED WITH NO COMMERICAL DATA 
. *************************************************************
. *************************************************************
. 
. **************************************************************************
. ******* CLEAN GCEL
. **************************************************************************
. include "../Data_Cleaning/Clean_GCEL.do"
{txt}
{com}. import excel "../Raw/GCEL_Company_list/GCEL_Company_list.xlsx", clear first sheet("Output")
{res}{text}(29 vars, 2,953 obs)

{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(2 observations deleted)

{com}. drop A csr20 cspp20 csr30 cspp30 Z
{txt}
{com}. rename Q CoalSharePowerBasedGenCap
{res}{txt}
{com}. 
. //clean up name variables very lightly 
. replace Company = strtrim(Company)
{txt}(155 real changes made)

{com}. replace ParentCompany = strtrim(ParentCompany)
{txt}(2,036 real changes made)

{com}. replace CoalIndustrySector = "Power, Services, Mining" if GCELcompanyID == 524
{txt}(1 real change made)

{com}. replace subsidiariesaffiliatesjointv = 12 if GCELcompanyID == 524 
{txt}(2 real changes made)

{com}. replace CoalIndustrySector = "Power, Mining, Services (finance)" if GCELcompanyID == 670
{txt}variable {bf}{res}CoalIndustrySector{sf}{txt} was {bf}{res}str23{sf}{txt} now {bf}{res}str33{sf}
{txt}(2 real changes made)

{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(2 observations deleted)

{com}. duplicates report GCELcompanyID ParentCompany

{p 0 4}{txt}Duplicates in terms of {res} GCELcompanyID ParentCompany{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}         {res}2949             0
{txt}{hline 10}{c BT}{hline 27}

{com}. 
. replace subsidiariesaffiliatesjointv = . if GCELcompanyID == 6300 //Fixing mistake in parent designation
{txt}(1 real change made, 1 to missing)

{com}. gen parentID_test = GCELcompanyID if missing(subsidiariesaffiliatesjointv)
{txt}(2,013 missing values generated)

{com}. order GCELcompanyID parentID_test
{txt}
{com}. replace parentID_test = parentID_test[_n-1] if ~missing(subsidiariesaffiliatesjointv)
{txt}(2,013 real changes made)

{com}. 
. gen parent_clean = lower(ParentCompany)
{txt}
{com}. replace parent_clean = subinstr(parent_clean,".","",.)
{txt}(113 real changes made)

{com}. 
. //manual fixes 
. replace parentID_test = 294 if GCELcompanyID == 6328
{txt}(1 real change made)

{com}. replace parentID_test = 1507 if ParentCompany == "Jindal Steel & Power Ltd"
{txt}(4 real changes made)

{com}. replace parentID_test = . if inlist(GCELcompanyID,1480,6093,1627,1742)
{txt}(4 real changes made, 4 to missing)

{com}. egen npID = nvals(parentID_test), by(parent_clean)
{txt}(4 missing values generated)

{com}. egen npName = nvals(parent_clean), by(parentID_test)
{txt}
{com}. 
. //for missing parents, use their own ID number 
. replace parentID_test = GCELcompanyID if missing(parentID_test)
{txt}(4 real changes made)

{com}. 
. //Get rid of a duplicate observation 
. drop if GCELcompanyID == 2927
{txt}(1 observation deleted)

{com}. duplicates report Company ParentCompany

{p 0 4}{txt}Duplicates in terms of {res} Company ParentCompany{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}         {res}2948             0
{txt}{hline 10}{c BT}{hline 27}

{com}. 
. //look for companies with multiple IDs across different parents 
. egen nID = nvals(GCELcompanyID), by(Company)
{txt}
{com}. replace GCELcompanyID = 816 if GCELcompanyID == 2680
{txt}(1 real change made)

{com}. replace GCELcompanyID = 1870 if GCELcompanyID == 2802
{txt}(1 real change made)

{com}. drop nID
{txt}
{com}. 
. tempfile gcel 
{txt}
{com}. save `gcel'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000001{rm}
saved
as .dta format
{p_end}

{com}. 
. //NOW GET PARENTS 
. use `gcel'
{txt}
{com}. order Company ParentCompany GCELcompanyID
{txt}
{com}. gen likelyparent = subsidiariesaffiliatesjointv == .
{txt}
{com}. gen namesame = Company == ParentCompany
{txt}
{com}. gen isParent = subsidiariesaffiliatesjointv == . | Company == ParentCompany
{txt}
{com}. 
. keep if subsidiariesaffiliatesjointv == .
{txt}(2,012 observations deleted)

{com}. 
. 
. use `gcel', clear
{txt}
{com}. keep Company GCELcompanyID
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(165 observations deleted)

{com}. rename GCELcompanyID ParentcompanyID 
{res}{txt}
{com}. rename Company ParentCompany
{res}{txt}
{com}. replace ParentCompany = strtrim(ParentCompany)
{txt}(0 real changes made)

{com}. tempfile parent 
{txt}
{com}. save `parent'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000002{rm}
saved
as .dta format
{p_end}

{com}. 
. use `gcel', clear 
{txt}
{com}. replace ParentCompany = strtrim(ParentCompany)
{txt}(0 real changes made)

{com}. merge m:1 ParentCompany using `parent'
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           1,970
{txt}{col 9}from master{col 30}{res}             100{txt}  (_merge==1)
{col 9}from using{col 30}{res}           1,870{txt}  (_merge==2)

{col 5}Matched{col 30}{res}           2,848{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. import excel "../Raw/GCEL_Company_list/GCEL_Company_list.xlsx", clear first sheet("Output")
{res}{text}(29 vars, 2,953 obs)

{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(2 observations deleted)

{com}. drop A csr20 cspp20 csr30 cspp30 Z
{txt}
{com}. rename Q CoalSharePowerBasedGenCap
{res}{txt}
{com}. replace Company = strtrim(Company)
{txt}(155 real changes made)

{com}. replace ParentCompany = strtrim(ParentCompany)
{txt}(2,036 real changes made)

{com}. replace CoalIndustrySector = "Power, Services, Mining" if GCELcompanyID == 524
{txt}(1 real change made)

{com}. replace subsidiariesaffiliatesjointv = 12 if GCELcompanyID == 524 
{txt}(2 real changes made)

{com}. replace CoalIndustrySector = "Power, Mining, Services (finance)" if GCELcompanyID == 670
{txt}variable {bf}{res}CoalIndustrySector{sf}{txt} was {bf}{res}str23{sf}{txt} now {bf}{res}str33{sf}
{txt}(2 real changes made)

{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(2 observations deleted)

{com}. duplicates report GCELcompanyID ParentCompany

{p 0 4}{txt}Duplicates in terms of {res} GCELcompanyID ParentCompany{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}         {res}2949             0
{txt}{hline 10}{c BT}{hline 27}

{com}. keep if missing(subsidiariesaffiliatesjointv) //keep parents only
{txt}(2,014 observations deleted)

{com}. drop subsidiariesaffiliatesjointv
{txt}
{com}. drop Company
{txt}
{com}. order GCELcompanyID ParentCompany
{txt}
{com}. rename GCELcompanyID ParentID_GCEL 
{res}{txt}
{com}. gen expansion_infrastructure = regexm(expansionplans,"infrastructure")
{txt}
{com}. gen expansion_mining = regexm(expansionplans,"mining")
{txt}
{com}. gen expansion_power = regexm(expansionplans,"power")
{txt}
{com}. drop expansionplans 
{txt}
{com}. gen coal_industry_power = regexm(CoalIndustrySector,"Power")
{txt}
{com}. gen coal_industry_services = regexm(CoalIndustrySector,"Services")
{txt}
{com}. gen coal_industry_mining = regexm(CoalIndustrySector,"Mining")
{txt}
{com}. drop CoalIndustrySector
{txt}
{com}. 
. drop ExpansionPlansCoalPowerCoun AnnualCoalProductionCountrie ExpansionCoalMiningCountries
{txt}
{com}. drop CompanyWebsite CompanyReports InstalledCoalPowerCapacityC
{txt}
{com}. 
. rename CountryofHeadquarters Country
{res}{txt}
{com}. rename CoalShareofPowerProduction CoalSharePower
{res}{txt}
{com}. rename CoalShareofRevenue CoalFracRev
{res}{txt}
{com}. 
. // Cleaning CoalSharePowerParent
. replace CoalSharePower = subinstr(CoalSharePower,">","",.)
{txt}(38 real changes made)

{com}. replace CoalSharePower = subinstr(CoalSharePower,"<","",.)
{txt}(1 real change made)

{com}. replace CoalSharePower = subinstr(CoalSharePower,"%","",.)
{txt}(39 real changes made)

{com}. 
. // Cleaning CoalFracRevParent
. replace CoalFracRev = subinstr(CoalFracRev,">","",.)
{txt}(415 real changes made)

{com}. replace CoalFracRev = subinstr(CoalFracRev,"<","",.)
{txt}(76 real changes made)

{com}. replace CoalFracRev = subinstr(CoalFracRev,"%","",.)
{txt}(491 real changes made)

{com}. 
. destring CoalFracRev, replace ignore("NA" "NI" "/")
{txt}CoalFracRev: characters{res} N A space I /{txt} removed; {res}replaced {txt}as {res}double
{txt}(183 missing values generated)
{res}{txt}
{com}. destring CoalSharePower, replace ignore("NA" "NI" "/")
{txt}CoalSharePower: characters{res} N A I /{txt} removed; {res}replaced {txt}as {res}double
{txt}(496 missing values generated)
{res}{txt}
{com}. replace CoalFracRev = CoalFracRev/100 if CoalFracRev>1
{txt}(491 real changes made)

{com}. replace CoalSharePower = CoalSharePower/100 if CoalSharePower > 1
{txt}(39 real changes made)

{com}. 
. 
. //custom cleaning
. replace AnnualCoalProductioninmill = "" if ParentID_GCEL == 2136
{txt}(1 real change made)

{com}. replace AnnualCoalProductioninmill = "6" if AnnualCoalProductioninmill == "<6"
{txt}(1 real change made)

{com}. replace AnnualCoalProductioninmill = "75.7" if AnnualCoalProductioninmill == ">75,7"
{txt}(1 real change made)

{com}. 
. 
. //cleaning other numeric variables 
. foreach var of var ExpansionPlansCoalPowerPro ExpansionPlansCoalPowerTot InstalledCoalPowerCapacity AnnualCoalProductioninmill {c -(}
{txt}  2{com}.         replace `var' = subinstr(`var',">","",.)
{txt}  3{com}.         destring `var', replace ignore("NA" "NI" "/")
{txt}  4{com}. {c )-}
{txt}(0 real changes made)
ExpansionPlansCoalPowerPro: character{res} /{txt} removed; {res}replaced {txt}as {res}double
{txt}(636 missing values generated)
{res}{txt}(0 real changes made)
ExpansionPlansCoalPowerTot: characters{res} space /{txt} removed; {res}replaced {txt}as {res}long
{txt}(636 missing values generated)
{res}{txt}(30 real changes made)
InstalledCoalPowerCapacity: characters{res} N A space I /{txt} removed; {res}replaced {txt}as {res}double
{txt}(484 missing values generated)
{res}{txt}(10 real changes made)
AnnualCoalProductioninmill: characters{res} N A I /{txt} removed; {res}replaced {txt}as {res}double
{txt}(623 missing values generated)
{res}{txt}
{com}. 
. 
. // Getting ContinentParent variable
. kountry Country, from(other) geo(marc)

{txt}{hline 51}
The command has finished.
The new variables are named {com}NAMES_STD {txt}and {com}GEO{txt}.
{hline 51}

{com}. rename GEO Continent
{res}{txt}
{com}. drop NAMES_STD
{txt}
{com}. replace Continent = "Asia" if Country == "China (Hong Kong)" | Country == "Taiwan"
{txt}(21 real changes made)

{com}. replace Continent = "Europe" if Country == "Jersey"
{txt}(0 real changes made)

{com}. order Continent, after(Country)
{txt}
{com}. 
. save ../Intermediate/GCEL_parent_clean, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/GCEL_parent_clean.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/GCEL_parent_clean.dta{rm}
saved
{p_end}

{com}. 
. {txt}
{com}. 
. **************************************************************************
. ******* CLEAN Co2 INTENSITY (Our world in Data NGO)
. **************************************************************************
. include "../Data_Cleaning/Clean_Power_Co2_Intensity.do"
{txt}
{com}. 
. //get co2 intensity data
. import delimited using ../Raw/ourworldindata/carbon-intensity-electricity.csv, clear
{res}{txt}(encoding automatically selected: ISO-8859-1)
{res}{text}(4 vars, 5,165 obs)

{com}. tempfile co2intensity
{txt}
{com}. save `co2intensity'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000003{rm}
saved
as .dta format
{p_end}

{com}. 
. //get country-production type outputs
. import delimited using ../Raw/ourworldindata/electricity-prod-source-stacked.csv, clear
{res}{txt}(encoding automatically selected: ISO-8859-1)
{res}{text}(12 vars, 7,191 obs)

{com}. rename otherrenewablesexcludingbioenerg electricityfromotherrenewtwh
{res}{txt}
{com}. egen electricity_total_twh = rowtotal(electricity*)
{txt}
{com}. 
. //merge to co2 intensity
. merge 1:1 entity year using `co2intensity', keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           5,165{txt}  
{col 5}{hline 41}

{com}. drop if year < 2000 | year == 2022
{txt}(90 observations deleted)

{com}. 
. 
. foreach var of var electricityfrom* {c -(}
{txt}  2{com}.         replace `var' = 0 if missing(`var')
{txt}  3{com}.         gen s_`var' = `var'/electricity_total_twh
{txt}  4{com}. {c )-}
{txt}(156 real changes made)
(22 real changes made)
(0 real changes made)
(0 real changes made)
(22 real changes made)
(131 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

{com}.  
. 
. 
. 
. //clean up country names
. kountry entity, from(other) geo(marc)

{txt}{hline 51}
The command has finished.
The new variables are named {com}NAMES_STD {txt}and {com}GEO{txt}.
{hline 51}

{com}. replace NAMES_STD = "Czech Republic" if NAMES_STD == "czechia"
{txt}(22 real changes made)

{com}. replace GEO = "Africa" if inlist(NAMES_STD,"eswatini")
{txt}(22 real changes made)

{com}. replace GEO = "Asia" if inlist(NAMES_STD,"Hong Kong","Taiwan","Myanmar")
{txt}(66 real changes made)

{com}. drop code 
{txt}
{com}. rename entity Country_co2
{res}{txt}
{com}. replace GEO = "Asia" if inlist(GEO,"West Indies", "Indian Ocean","Pacific Ocean")
{txt}(828 real changes made)

{com}. replace GEO = "Europe" if inlist(NAMES_STD,"Czech Republic")
{txt}(22 real changes made)

{com}. drop if missing(GEO) 
{txt}(637 observations deleted)

{com}. rename GEO region_co2
{res}{txt}
{com}. rename s_electricityfrom*twh share_*
{res}{txt}
{com}. rename electricityfrom*twh *_twh
{res}{txt}
{com}. 
. 
. rename carbonintensityofelectricitygco2 co2e_kwh 
{res}{txt}
{com}. 
. rename NAMES_STD Country
{res}{txt}
{com}. order Country
{txt}
{com}. order region_co2, after(Country)
{txt}
{com}. 
. compress
  {txt}variable {bf}{res}Country{sf}{txt} was {bf}{res}str33{sf}{txt} now {bf}{res}str32{sf}
  {txt}variable {bf}{res}Country_co2{sf}{txt} was {bf}{res}str35{sf}{txt} now {bf}{res}str32{sf}
{txt}  (17,752 bytes saved)

{com}. 
. save ../Intermediate/country_power_co2intensity, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/country_power_co2intensity.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/country_power_co2intensity.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. 
. {txt}
{com}. 
. **************************************************************************
. ******* CLEAN SBTI
. **************************************************************************
. include "../Data_Cleaning/Clean_SBTI.do"
{txt}
{com}. 
. 
. use "../Raw/SBTI/sbti.dta", clear
{txt}
{com}. 
. drop if missing(bankname)
{txt}(20 observations deleted)

{com}. rename bankname BankName
{res}{txt}
{com}. 
. drop sector organizationtype target targetclassification extension
{txt}
{com}. 
. drop longterm*
{txt}
{com}. drop netzeroyear
{txt}
{com}. 
. gen date_sbti=date(date, "DM20Y")
{txt}
{com}. gen year_sbti=yofd(date_sbti)
{txt}
{com}. 
. gen ba15_d=(ba15=="Yes")
{txt}
{com}. gen netzero_d=(netzerocommitted=="Yes")
{txt}
{com}. 
. gen targetset=(neartermtargetstatus=="Targets Set")
{txt}
{com}. 
. save "../Intermediate/sbti_clean.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/sbti_clean.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/sbti_clean.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. **************************************************************************
. ******* CLEAN RECLAIM FINANCE 
. **************************************************************************
. include "../Data_Cleaning/Clean_Reclaim_Finance_Score.do"
{txt}
{com}. use "../Raw/Yann_Louvel_Reclaim_Finance/coalpolicy_nov2022.dta"
{txt}
{com}.   
. destring projects developers relativethreshold absolutethreshold phaseout, replace force
{txt}projects: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(2 missing values generated)
{res}{txt}developers: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(1 missing value generated)
{res}{txt}relativethreshold: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(1 missing value generated)
{res}{txt}absolutethreshold: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(1 missing value generated)
{res}{txt}phaseout: contains nonnumeric characters; {res}replaced {txt}as {res}byte
{txt}(4 missing values generated)
{res}{txt}
{com}. rename bankname BankName
{res}{txt}
{com}. drop if missing(BankName)
{txt}(4 observations deleted)

{com}.  
. save "../intermediate/policy_strength_reclaim.dta", replace
{txt}{p 0 4 2}
(file {bf}
../intermediate/policy_strength_reclaim.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../intermediate/policy_strength_reclaim.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. **************************************************************************
. ******* CLEAN GEM PLANTS
. **************************************************************************
. include "../Data_Cleaning/Clean_Gem_Plant_Data.do"
{txt}
{com}. 
. 
. ************************************************
. *
. *Providing Status of plants from 2021 and 2022
. *
. *********************************************************
. 
. // 2021 data vintage
. import excel "../Raw/GEM/January 2021 Global Coal Plant Tracker.xlsx", sheet("Units") firstrow clear 
{res}{text}(36 vars, 13,218 obs)

{com}. keep TrackerID Status
{txt}
{com}. replace Status=strtrim(Status)
{txt}(4 real changes made)

{com}. replace Status=strupper(Status)
{txt}(13,218 real changes made)

{com}. rename Status status_gcpt21
{res}{txt}
{com}. tempfile gcpt2021
{txt}
{com}. save `gcpt2021'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000004{rm}
saved
as .dta format
{p_end}

{com}. 
. //2022 data vintage
. import excel "../Raw/GEM/Global-Coal-Plant-Tracker-Jan-2022", sheet("Units") firstrow clear 
{res}{text}(37 vars, 13,412 obs)

{com}. merge 1:1 TrackerID using `gcpt2021', keep(1 3) nogen 
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             315
{txt}{col 9}from master{col 30}{res}             315{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          13,097{txt}  
{col 5}{hline 41}

{com}. 
. **clean data
. keep TrackerID TrackerLOC ParentID Country Subnationalunitprovincestat Unit Plant Parent Status Year RETIRED PlannedRetire HeatrateBtuperkWh ///
> Remainingplantlifetimeyears Combustiontechnology Coaltype CapacityMW Capacityfactor AnnualCO2milliontonnesann status_gcpt21
{txt}
{com}. rename (Country Subnationalunitprovincestat Year RETIRED PlannedRetire) (PlantCountry PlantProvince EstYr RetiredYr PlanRetireYr)
{res}{txt}
{com}. replace EstYr="" if  missing(real(EstYr))==1
{txt}(167 real changes made)

{com}. destring EstYr, replace
{txt}EstYr: all characters numeric; {res}replaced {txt}as {res}int
{txt}(3650 missing values generated)
{res}{txt}
{com}. replace PlanRetireYr="" if  missing(real(PlanRetireYr))==1
{txt}(6 real changes made)

{com}. destring PlanRetireYr, replace
{txt}PlanRetireYr: all characters numeric; {res}replaced {txt}as {res}int
{txt}(12419 missing values generated)
{res}{txt}
{com}. replace Status=strtrim(Status)
{txt}(0 real changes made)

{com}. replace Status=strupper(Status)
{txt}(13,412 real changes made)

{com}. 
. 
. //look at status changes 
. rename Status status_gcpt22
{res}{txt}
{com}. label var status_gcpt22 "Status 2022"
{txt}
{com}. label var status_gcpt21 "Status 2021"
{txt}
{com}. 
. tempfile gcpt_2021_2022
{txt}
{com}. save `gcpt_2021_2022'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000005{rm}
saved
as .dta format
{p_end}

{com}. 
. *********************************************************
. *
. *GCPT Retirement 2017-2020
. *
. *********************************************************
. clear
{txt}
{com}. tempfile cumulator
{txt}
{com}. quietly save `cumulator', emptyok
{txt}
{com}. 
. foreach sheet in "July 2017" "Jan 2018" "Jul 2018" "Jan 2019" "July 2019" "Jan 2020" {c -(}
{txt}  2{com}.         import excel "../Raw/GCPTs/2015 - 2020 GEM Global Coal Plant Tracker.xlsx", clear firstrow sheet(`sheet')
{txt}  3{com}.         gen sheet = "`sheet'"
{txt}  4{com}.         destring PlannedRetire, replace force
{txt}  5{com}.         rename PlannedRetire GCPT_planned_retire_year
{txt}  6{com}.         keep TrackerID  sheet GCPT_planned_retire_year 
{txt}  7{com}.         append using `cumulator'
{txt}  8{com}.         quietly save `cumulator', replace
{txt}  9{com}. 
. {c )-}
{res}{text}(35 vars, 12,076 obs)
PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(11632 missing values generated)
{res}{text}(38 vars, 12,394 obs)
PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(11898 missing values generated)
{res}{txt}{p 0 7 2}
(variable
{bf:sheet} was {bf:str8}, now {bf:str9} to accommodate using data's values)
{p_end}
{res}{text}(34 vars, 12,457 obs)
PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(11985 missing values generated)
{res}{txt}{p 0 7 2}
(variable
{bf:sheet} was {bf:str8}, now {bf:str9} to accommodate using data's values)
{p_end}
{res}{text}(35 vars, 12,607 obs)
PlannedRetire already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:sheet} was {bf:str8}, now {bf:str9} to accommodate using data's values)
{p_end}
{res}{text}(35 vars, 12,710 obs)
PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(12055 missing values generated)
{res}{text}(31 vars, 12,875 obs)
PlannedRetire already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:sheet} was {bf:str8}, now {bf:str9} to accommodate using data's values)
{p_end}

{com}. 
. import excel "../Raw/GCPTs/January 2021 Global Coal Plant Tracker.xlsx", clear sheet(Units) firstrow
{res}{text}(36 vars, 13,218 obs)

{com}.         gen sheet = "Jan 2021"
{txt}
{com}.         destring PlannedRetire, replace force
{txt}PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(12482 missing values generated)
{res}{txt}
{com}.         rename PlannedRetire GCPT_planned_retire_year
{res}{txt}
{com}.         keep TrackerID  sheet GCPT_planned_retire_year 
{txt}
{com}.         append using `cumulator'
{txt}{p 0 7 2}
(variable
{bf:sheet} was {bf:str8}, now {bf:str9} to accommodate using data's values)
{p_end}

{com}.         quietly save `cumulator', replace
{txt}
{com}.         
.         
. import excel "../Raw/GCPTs/July 2021b Global Coal Plant Tracker.xlsx", clear sheet(Units) firstrow
{res}{text}(37 vars, 13,284 obs)

{com}.         gen sheet = "July 2021"
{txt}
{com}.         destring PlannedRetire, replace force
{txt}PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(12414 missing values generated)
{res}{txt}
{com}.         rename PlannedRetire GCPT_planned_retire_year
{res}{txt}
{com}.         keep TrackerID  sheet GCPT_planned_retire_year 
{txt}
{com}.         append using `cumulator'
{txt}
{com}.         quietly save `cumulator', replace
{txt}
{com}. 
. 
. import excel "../Raw/GCPTs/Global-Coal-Plant-Tracker-January-2022b (2).xlsx", clear sheet(Units) firstrow
{res}{text}(37 vars, 13,412 obs)

{com}.         gen sheet = "Jan 2022"
{txt}
{com}.         destring PlannedRetire, replace force
{txt}PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(12419 missing values generated)
{res}{txt}
{com}.         rename PlannedRetire GCPT_planned_retire_year
{res}{txt}
{com}.         keep TrackerID  sheet GCPT_planned_retire_year 
{txt}
{com}.         append using `cumulator'
{txt}{p 0 7 2}
(variable
{bf:sheet} was {bf:str8}, now {bf:str9} to accommodate using data's values)
{p_end}

{com}.         quietly save `cumulator', replace
{txt}
{com}.         
. import excel "../Raw/GCPTs/Global-Coal-Plant-Tracker-July-2022.xlsx", clear sheet(Units) firstrow
{res}{text}(37 vars, 13,491 obs)

{com}.         gen sheet = "July 2022"
{txt}
{com}.         destring PlannedRetire, replace force
{txt}PlannedRetire: contains nonnumeric characters; {res}replaced {txt}as {res}int
{txt}(12504 missing values generated)
{res}{txt}
{com}.         rename PlannedRetire GCPT_planned_retire_year
{res}{txt}
{com}.         keep TrackerID  sheet GCPT_planned_retire_year 
{txt}
{com}.         append using `cumulator'
{txt}
{com}.         quietly save `cumulator', replace
{txt}
{com}. 
. 
. drop if missing(TrackerID)
{txt}(19 observations deleted)

{com}. 
. gen year = substr(sheet, -4, .)
{txt}
{com}. destring year, replace
{txt}year: all characters numeric; {res}replaced {txt}as {res}int
{txt}
{com}. egen gcpt_earl_annoucement__rtr_yr = min(year) if !missing(GCPT_planned_retire_year), by(TrackerID)
{txt}(121,563 missing values generated)

{com}. 
. 
. 
. sort TrackerID year
{txt}
{com}. egen tag = tag(GCPT_planned_retire_year TrackerID)
{txt}
{com}. egen gcpt_retire_yr_switch = total(tag), by(TrackerID)
{txt}
{com}. by TrackerID (sheet), sort: gen gcpt_n_changes = sum(GCPT_planned_retire_year != GCPT_planned_retire_year[_n-1] & GCPT_planned_retire_year != 1)
{txt}
{com}. egen gcpt_first_plan =  min(GCPT_planned_retire_year) if gcpt_n_changes == 1, by(TrackerID)
{txt}(125,298 missing values generated)

{com}. egen gcpt_second_plan =  min(GCPT_planned_retire_year) if gcpt_n_changes == 2, by(TrackerID)
{txt}(127,949 missing values generated)

{com}. egen gcpt_third_plan =  min(GCPT_planned_retire_year) if gcpt_n_changes == 3, by(TrackerID)
{txt}(126,659 missing values generated)

{com}. drop tag
{txt}
{com}. 
. 
. 
. collapse (min) GCPT_first_retire_yr_plan = GCPT_planned_retire_year gcpt*, by(TrackerID)
{res}{txt}
{com}. drop if missing(GCPT_first_retire_yr_plan)
{txt}(12,478 observations deleted)

{com}. 
. tempfile retire
{txt}
{com}. save `retire'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000007{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. *********************************************************
. *
. *Status Changes from 2014-2022
. *
. *********************************************************
. import excel using "../Raw/GEM/Jan 2023 GCPT Status Changes - 2014 - 2022 (13).xlsx", clear firstrow
{res}{text}(29 vars, 13,650 obs)

{com}. 
. *Left Censor Data if had a status before data began 
. gen left_cen = H22014 ~= "XXX"
{txt}
{com}. 
. *Renaming year
. rename (Year RETIRED Country Subnationalunitprovincestat) (EstYr RetiredYr PlantCountry PlantProvince)
{res}{txt}
{com}. 
. *Getting Most Recent Status
. gen most_recent_status_2022 = H22022
{txt}
{com}. 
. *Turning EstYr to numbers
. replace EstYr="" if  missing(real(EstYr))==1
{txt}(67 real changes made)

{com}. destring EstYr, replace
{txt}EstYr: all characters numeric; {res}replaced {txt}as {res}int
{txt}(3790 missing values generated)
{res}{txt}
{com}. 
. 
. *Shaping data long
. reshape long H, i(TrackerID) j(temp_date)
{txt}(j = 12015 12016 12017 12018 12019 12020 12021 12022 22014 22015 22016 22017 22018 22019 22020 22021 22022)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}      13,650   {txt}->   {res}232,050     
{txt}Number of variables        {res}          31   {txt}->   {res}16          
{txt}j variable (17 values)                    ->   {res}temp_date
{txt}xij variables:
               {res}H12015 H12016 ... H22022   {txt}->   {res}H
{txt}{hline 77}

{com}. rename H status
{res}{txt}
{com}. 
. *Extracting date
. gen first_digit = real(substr(string(temp_date, "%5.0g"), 1, 1))
{txt}
{com}. gen day_of_half_year = 1 + (first_digit - 1) * 6
{txt}
{com}. gen year = real(substr(string(temp_date), 2, 5))
{txt}
{com}. gen date = mdy(day_of_half_year, 1, year)
{txt}
{com}. format date %tdCCYY-NN-DD
{txt}
{com}. drop first_digit day_of_half_year year temp_date
{txt}
{com}. 
. *Creating variable if zombie_plant (If mothball and then unmothball)
. sort TrackerID date
{txt}
{com}. by TrackerID: gen next_status = status[_n+1]
{txt}(13,650 missing values generated)

{com}. bysort TrackerID: egen zombie_plant = max(status == "Mothballed" & next_status == "Operating")
{txt}
{com}. bysort TrackerID: egen dead_mothball_plant = max(status == "Mothballed" & next_status == "Retired")
{txt}
{com}. drop next_status
{txt}
{com}. bysort TrackerID: egen operating_2014 = max(date == mdy(7, 1, 2014) & status == "Operating")
{txt}
{com}. 
. *First and last date that plant retires/mothballs since data start
. gen retired_mothballed_2014 = status == "Mothballed" | status == "Retired"
{txt}
{com}. egen retired_moth_2014_first_date = min(cond(retired_mothballed_2014, date, .)), by(TrackerID)
{txt}(181,475 missing values generated)

{com}. format retired_moth_2014_first_date %tdCCYY-NN-DD
{txt}
{com}. egen retired_moth_2014_last_date = max(cond(retired_mothballed_2014, date, .)), by(TrackerID)
{txt}(181,475 missing values generated)

{com}. format retired_moth_2014_last_date %tdCCYY-NN-DD
{txt}
{com}. drop retired_mothballed_2014
{txt}
{com}. 
. 
. *First date of each status
. egen first_date_ = min(date), by(status TrackerID)
{txt}
{com}. format first_date_ %tdCCYY-NN-DD
{txt}
{com}. 
. 
. *Condense data
. drop date
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(207,615 observations deleted)

{com}. replace status = subinstr(status, "Pre-permit", "pre_permit", .)
{txt}(1,847 real changes made)

{com}. 
. *reshaping data wide
. reshape wide first_date_, i(TrackerID) j(status) string
{txt}(j = Announced Cancelled Construction Mothballed Operating Permitted Retired Shelved XXX pre_permit)

Data{col 36}Long{col 43}->{col 48}Wide
{hline 77}
Number of observations     {res}      24,435   {txt}->   {res}13,650      
{txt}Number of variables        {res}          21   {txt}->   {res}29          
{txt}j variable (10 values)           {res}status   {txt}->   (dropped)
xij variables:
                            {res}first_date_   {txt}->   {res}first_date_Announced first_date_Cancelled ... first_date_pre_permit
{txt}{hline 77}

{com}. gen est_year_date = mdy(1, 1, EstYr)
{txt}(3,790 missing values generated)

{com}. format est_year_date %tdCCYY-NN-DD
{txt}
{com}. 
. *Updating retired
. gen retired_date = mdy(1, 1, RetiredYr)
{txt}(10,943 missing values generated)

{com}. format retired_date %tdCCYY-NN-DD
{txt}
{com}. replace first_date_Retired = retired_date if retired_date < mdy(7, 1, 2014) & !missing(retired_date)
{txt}(1,310 real changes made)

{com}. drop retired_date
{txt}
{com}. 
. *Removing established year if plant was canceled, not built yet, Mothballed
. replace est_year_date = . if !missing(first_date_Cancelled) | est_year_date > mdy(7, 1, 2014) ///
>         | first_date_Mothballed == mdy(7, 1, 2014)
{txt}(2,013 real changes made, 2,013 to missing)

{com}.         
. *Replacing Operation with Established year
. replace first_date_Operating = est_year_date if ~missing(est_year_date) & est_year_date < first_date_Operating
{txt}(7,847 real changes made)

{com}. 
. *Left Censor Variable
. replace left_cen = (first_date_Operating < mdy(7, 1, 2014))*left_cen
{txt}(4,386 real changes made)

{com}. drop if TrackerID == "G103638"
{txt}(1 observation deleted)

{com}. 
. 
. 
. *********************************************************
. *
. *Merging data
. *
. *********************************************************
. merge 1:1 TrackerID using `gcpt_2021_2022', nogen
{res}{txt}{p 0 7 2}
(variable
{bf:PlantCountry} was {bf:str22}, now {bf:str28} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Unit} was {bf:str54}, now {bf:str72} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             393
{txt}{col 9}from master{col 30}{res}             315{txt}  
{col 9}from using{col 30}{res}              78{txt}  

{col 5}Matched{col 30}{res}          13,334{txt}  
{col 5}{hline 41}

{com}. merge 1:1 TrackerID using `retire', nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          12,209
{txt}{col 9}from master{col 30}{res}          12,191{txt}  
{col 9}from using{col 30}{res}              18{txt}  

{col 5}Matched{col 30}{res}           1,536{txt}  
{col 5}{hline 41}

{com}. 
. drop first_date_XXX 
{txt}
{com}. replace first_date_Operating = mdy(1, 1, EstYr) if missing(first_date_Operating)
{txt}(705 real changes made)

{com}. replace first_date_Retired = mdy(1, 1, RetiredYr) if missing(first_date_Retired)
{txt}(11 real changes made)

{com}. 
. 
. save "../Intermediate/gcpt_clean.dta",replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/gcpt_clean.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/gcpt_clean.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. 
. 
. 
. 
. 
. {txt}
{com}. 
. **************************************************************************
. ******* CLEAN IPCC SCENARIOS
. **************************************************************************
. include "../Data_Cleaning/Clean_Ipcc_Scenarios.do"
{txt}
{com}. //import and clean IPCC scenario data
. 
. import excel using "../Raw/Scenarios IPCC/data_selected_scenarios.xlsx",  clear firstrow
{res}{text}(112 vars, 17 obs)

{com}. drop if Model == ""
{txt}(5 observations deleted)

{com}. 
. replace Variable = "total_co2_Mt_CO2yr" if Variable == "AR6 climate diagnostics|Infilled|Emissions|CO2"
{txt}(2 real changes made)

{com}. replace Variable = "kyoto_gases_Mt_CO2eyr" if Variable == "AR6 climate diagnostics|Infilled|Emissions|Kyoto Gases (AR5-GWP100)"
{txt}(2 real changes made)

{com}. replace Variable = "coal_power_capacity_GW" if Variable == "Capacity|Electricity|Coal"
{txt}(2 real changes made)

{com}. replace Variable = "primaryenergy_coal_EJyr" if Variable == "Primary Energy|Coal"
{txt}(2 real changes made)

{com}. replace Variable = "secondaryenergy_elec_coal_EJyr" if Variable == "Secondary Energy|Electricity|Coal"
{txt}(2 real changes made)

{com}. drop if Variable == "Emissions|CO2"
{txt}(2 observations deleted)

{com}. drop Unit DH
{txt}
{com}. 
. ds Model Scenario Region Variable, not
{txt}{col 1}F{col 5}K{col 9}P{col 13}U{col 17}Z{col 21}AE{col 25}AJ{col 29}AO{col 33}AT{col 37}AY{col 41}BD{col 45}BI{col 49}BN{col 53}BS{col 57}BX{col 61}CC{col 65}CH{col 69}CM{col 73}CR{col 77}CW{col 81}DB{col 85}DG
{col 1}G{col 5}L{col 9}Q{col 13}V{col 17}AA{col 21}AF{col 25}AK{col 29}AP{col 33}AU{col 37}AZ{col 41}BE{col 45}BJ{col 49}BO{col 53}BT{col 57}BY{col 61}CD{col 65}CI{col 69}CN{col 73}CS{col 77}CX{col 81}DC
{col 1}H{col 5}M{col 9}R{col 13}W{col 17}AB{col 21}AG{col 25}AL{col 29}AQ{col 33}AV{col 37}BA{col 41}BF{col 45}BK{col 49}BP{col 53}BU{col 57}BZ{col 61}CE{col 65}CJ{col 69}CO{col 73}CT{col 77}CY{col 81}DD
{col 1}I{col 5}N{col 9}S{col 13}X{col 17}AC{col 21}AH{col 25}AM{col 29}AR{col 33}AW{col 37}BB{col 41}BG{col 45}BL{col 49}BQ{col 53}BV{col 57}CA{col 61}CF{col 65}CK{col 69}CP{col 73}CU{col 77}CZ{col 81}DE
{col 1}J{col 5}O{col 9}T{col 13}Y{col 17}AD{col 21}AI{col 25}AN{col 29}AS{col 33}AX{col 37}BC{col 41}BH{col 45}BM{col 49}BR{col 53}BW{col 57}CB{col 61}CG{col 65}CL{col 69}CQ{col 73}CV{col 77}DA{col 81}DF

{com}. local torename `r(varlist)'
{txt}
{com}. foreach v of local torename {c -(}
{txt}  2{com}.         destring `v', replace
{txt}  3{com}.     local lbl : variable label `v'
{txt}  4{com}.     rename `v' y_`lbl' 
{txt}  5{com}. {c )-}
{txt}F already numeric; no {res}replace
{txt}G already numeric; no {res}replace
{txt}H already numeric; no {res}replace
{txt}I already numeric; no {res}replace
{txt}J already numeric; no {res}replace
{txt}K already numeric; no {res}replace
{txt}L already numeric; no {res}replace
{txt}M already numeric; no {res}replace
{txt}N already numeric; no {res}replace
{txt}O already numeric; no {res}replace
{txt}P already numeric; no {res}replace
{txt}Q already numeric; no {res}replace
{txt}R already numeric; no {res}replace
{txt}S already numeric; no {res}replace
{txt}T already numeric; no {res}replace
{txt}U already numeric; no {res}replace
{txt}V already numeric; no {res}replace
{txt}W already numeric; no {res}replace
{txt}X already numeric; no {res}replace
{txt}Y already numeric; no {res}replace
{txt}Z already numeric; no {res}replace
{txt}AA already numeric; no {res}replace
{txt}AB already numeric; no {res}replace
{txt}AC already numeric; no {res}replace
{txt}AD already numeric; no {res}replace
{txt}AE already numeric; no {res}replace
{txt}AF already numeric; no {res}replace
{txt}AG already numeric; no {res}replace
{txt}AH already numeric; no {res}replace
{txt}AI already numeric; no {res}replace
{txt}AJ already numeric; no {res}replace
{txt}AK already numeric; no {res}replace
{txt}AL already numeric; no {res}replace
{txt}AM already numeric; no {res}replace
{txt}AN already numeric; no {res}replace
{txt}AO already numeric; no {res}replace
{txt}AP already numeric; no {res}replace
{txt}AQ already numeric; no {res}replace
{txt}AR already numeric; no {res}replace
{txt}AS already numeric; no {res}replace
{txt}AT already numeric; no {res}replace
{txt}AU already numeric; no {res}replace
{txt}AV already numeric; no {res}replace
{txt}AW already numeric; no {res}replace
{txt}AX already numeric; no {res}replace
{txt}AY already numeric; no {res}replace
{txt}AZ already numeric; no {res}replace
{txt}BA already numeric; no {res}replace
{txt}BB already numeric; no {res}replace
{txt}BC already numeric; no {res}replace
{txt}BD already numeric; no {res}replace
{txt}BE already numeric; no {res}replace
{txt}BF already numeric; no {res}replace
{txt}BG already numeric; no {res}replace
{txt}BH already numeric; no {res}replace
{txt}BI: all characters numeric; {res}replaced {txt}as {res}double
{txt}BJ already numeric; no {res}replace
{txt}BK already numeric; no {res}replace
{txt}BL already numeric; no {res}replace
{txt}BM already numeric; no {res}replace
{txt}BN already numeric; no {res}replace
{txt}BO already numeric; no {res}replace
{txt}BP already numeric; no {res}replace
{txt}BQ already numeric; no {res}replace
{txt}BR already numeric; no {res}replace
{txt}BS already numeric; no {res}replace
{txt}BT already numeric; no {res}replace
{txt}BU already numeric; no {res}replace
{txt}BV already numeric; no {res}replace
{txt}BW already numeric; no {res}replace
{txt}BX already numeric; no {res}replace
{txt}BY already numeric; no {res}replace
{txt}BZ already numeric; no {res}replace
{txt}CA already numeric; no {res}replace
{txt}CB already numeric; no {res}replace
{txt}CC already numeric; no {res}replace
{txt}CD already numeric; no {res}replace
{txt}CE already numeric; no {res}replace
{txt}CF already numeric; no {res}replace
{txt}CG already numeric; no {res}replace
{txt}CH already numeric; no {res}replace
{txt}CI already numeric; no {res}replace
{txt}CJ already numeric; no {res}replace
{txt}CK already numeric; no {res}replace
{txt}CL already numeric; no {res}replace
{txt}CM already numeric; no {res}replace
{txt}CN already numeric; no {res}replace
{txt}CO already numeric; no {res}replace
{txt}CP already numeric; no {res}replace
{txt}CQ already numeric; no {res}replace
{txt}CR already numeric; no {res}replace
{txt}CS already numeric; no {res}replace
{txt}CT already numeric; no {res}replace
{txt}CU already numeric; no {res}replace
{txt}CV already numeric; no {res}replace
{txt}CW already numeric; no {res}replace
{txt}CX already numeric; no {res}replace
{txt}CY already numeric; no {res}replace
{txt}CZ already numeric; no {res}replace
{txt}DA already numeric; no {res}replace
{txt}DB already numeric; no {res}replace
{txt}DC already numeric; no {res}replace
{txt}DD already numeric; no {res}replace
{txt}DE already numeric; no {res}replace
{txt}DF already numeric; no {res}replace
{txt}DG already numeric; no {res}replace
{txt}
{com}. 
. 
. reshape long y_, i(Model Scenario Region Variable) j(year)
{txt}(j = 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}          10   {txt}->   {res}1,060       
{txt}Number of variables        {res}         110   {txt}->   {res}6           
{txt}j variable (106 values)                   ->   {res}year
{txt}xij variables:
               {res}y_1995 y_1996 ... y_2100   {txt}->   {res}y_
{txt}{hline 77}

{com}. rename y_ y
{res}{txt}
{com}. reshape wide y, i(Model Scenario Region year) j(Variable) string
{txt}(j = coal_power_capacity_GW kyoto_gases_Mt_CO2eyr primaryenergy_coal_EJyr secondaryenergy_elec_coal_EJyr total_co2_Mt_CO2yr)

Data{col 36}Long{col 43}->{col 48}Wide
{hline 77}
Number of observations     {res}       1,060   {txt}->   {res}212         
{txt}Number of variables        {res}           6   {txt}->   {res}9           
{txt}j variable (5 values)          {res}Variable   {txt}->   (dropped)
xij variables:
                                      {res}y   {txt}->   {res}ycoal_power_capacity_GW ykyoto_gases_Mt_CO2eyr ... ytotal_co2_Mt_CO2yr
{txt}{hline 77}

{com}. rename year tyear 
{res}{txt}
{com}. rename y* * 
{res}{txt}
{com}. rename tyear year
{res}{txt}
{com}. 
. //fill in with interpolation
. foreach var of var coal_power_capacity_GW kyoto_gases_Mt_CO2eyr primaryenergy_coal_EJyr secondaryenergy_elec_coal_EJyr total_co2_Mt_CO2yr {c -(}
{txt}  2{com}.         //tempname vi 
.         tempvar vi
{txt}  3{com}.         by Model Scenario Region: ipolate `var' year, gen(`vi')
{txt}  4{com}.         replace `var' = `vi' if missing(`var')
{txt}  5{com}.         drop `vi'
{txt}  6{com}. {c )-}
{txt}(25 missing values generated)
(148 real changes made)
(40 missing values generated)
(0 real changes made)
(25 missing values generated)
(148 real changes made)
(25 missing values generated)
(148 real changes made)
(40 missing values generated)
(0 real changes made)

{com}. 
. compress
{txt}  (0 bytes saved)

{com}. save ../Intermediate/ipcc_scenarios_data, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/ipcc_scenarios_data.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/ipcc_scenarios_data.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. **************************************************************************
. ******* BUILD COAL EXIT DIVESTMENT SCORES 
. **************************************************************************
. *Generate simulation based measures of bank divestment policy strength
. include "../Data_Cleaning/Build_Policy_Strength.do" 
{txt}
{com}. 
. ***********************************************************************
. ** BUILD OUT SENSITIVITY 
. ***********************************************************************
. //initialize functions to check policies on a certain variable 
. clear
{txt}
{com}. include "../Data_Cleaning/Policy_Simulation_Programs.do"
{txt}
{com}. capture program drop policy_sim_strength
{txt}
{com}. program policy_sim_strength
{txt}  1{com}.         version 16
{txt}  2{com}. 
.         set varabbrev off
{txt}  3{com}. 
.         //the idea is to see what fraction of all possible combination of variables are banned by each bank
.     // and use this as a crude measure of the policy strength
. 
.         local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                            isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  4{com}. 
.         clear
{txt}  5{com}.     tempfile crossed
{txt}  6{com}.     clear 
{txt}  7{com}.     set obs 22
{txt}  8{com}.     gen year = 2008+_n
{txt}  9{com}.     save `crossed'
{txt} 10{com}. 
.     foreach item in `fulllist' {c -(}
{txt} 11{com}.         clear 
{txt} 12{com}.         set obs 2
{txt} 13{com}.         gen `item' = _n == 1
{txt} 14{com}.         cross using `crossed'
{txt} 15{com}.         save `crossed', replace
{txt} 16{com}.     {c )-}
{txt} 17{com}.     count if year == 2009 
{txt} 18{com}.     local scenario_count = r(N)
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 23{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 24{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 25{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 26{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 27{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 28{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 29{com}. 
.     //run the simulation
.     include "../Data_Cleaning/Policy_Coding_Function.do"
{txt} 30{com}. 
.     //count the number of banned scenarios by year
.     gcollapse (sum) ban_*, by(year)
{txt} 31{com}. 
.     greshape long ban_, i(year) j(BankID)
{txt} 32{com}. 
.     rename ban_ banned_scenario_count
{txt} 33{com}.     gen ban_intensity = banned_scenario_count/`scenario_count'
{txt} 34{com}. 
.     sort BankID year
{txt} 35{com}.     order BankID year
{txt} 36{com}. 
. end
{txt}
{com}. 
. 
. capture program drop policy_sim_univariate
{txt}
{com}. 
. program policy_sim_univariate
{txt}  1{com}.     version 16
{txt}  2{com}.     syntax name
{txt}  3{com}. 
.     set varabbrev off
{txt}  4{com}.     //display "`namelist'"
. 
.     //the idea is to see if there is a policy that in SOME way bans a certain variable
.     // to do this, we simulate all combinations of indicator variables except the one 
.     // in question. and then see if any of these are sensitive to changing the variable
.     // that is in question.
. 
.     local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                    isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  5{com}. 
.     local allelse: list fulllist-namelist
{txt}  6{com}. 
.     clear
{txt}  7{com}.     tempfile crossed
{txt}  8{com}.     clear 
{txt}  9{com}.     set obs 22
{txt} 10{com}.     gen year = 2008+_n
{txt} 11{com}.     save `crossed'
{txt} 12{com}. 
.     //make 2^n observations of all possible combinations of above binary variables
.     foreach item in `allelse' {c -(}
{txt} 13{com}.         clear 
{txt} 14{com}.         set obs 2
{txt} 15{com}.         gen `item' = _n == 1
{txt} 16{com}.         cross using `crossed'
{txt} 17{com}.         save `crossed', replace
{txt} 18{com}.     {c )-}
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
. 
.     //try these for the variable in question = 1 
.     gen `namelist' = 0
{txt} 23{com}. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 24{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 25{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 26{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 27{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 28{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 29{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 30{com}. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function.do"
{txt} 31{com}.     rename ban_* v0_ban_*
{txt} 32{com}. 
.     replace `namelist' = 1
{txt} 33{com}. 
.     //drop impossible scenarios (incase flipping namelist from 0 to 1 created a new impossible scenario)
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 34{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 35{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 36{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 37{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 38{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 39{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 40{com}. 
. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function"
{txt} 41{com}.     rename ban_* v1_ban_*
{txt} 42{com}. 
.     gen x = _n
{txt} 43{com}. 
.     keep x year *_ban_*
{txt} 44{com}. 
.     greshape long v0_ban_ v1_ban_, i(x year) j(BankID)
{txt} 45{com}. 
.     replace v0_ban_ = 0 if missing(v0_ban_)
{txt} 46{com}.     replace v1_ban_ = 0 if missing(v1_ban_)
{txt} 47{com}.     gen vdiff = v1_ban_ - v0_ban_
{txt} 48{com}.     gcollapse (mean) vdiff, by(BankID year)
{txt} 49{com}. 
. end
{txt}
{com}. 
. 
. 
. capture program drop policy_sim_strength_min
{txt}
{com}. program policy_sim_strength_min
{txt}  1{com}.         version 16
{txt}  2{com}. 
.         set varabbrev off
{txt}  3{com}. 
.         //the idea is to see what fraction of all possible combination of variables are banned by each bank
.     // and use this as a crude measure of the policy strength
. 
.         local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                            isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  4{com}. 
.         clear
{txt}  5{com}.     tempfile crossed
{txt}  6{com}.     clear 
{txt}  7{com}.     set obs 22
{txt}  8{com}.     gen year = 2008+_n
{txt}  9{com}.     save `crossed'
{txt} 10{com}. 
.     foreach item in `fulllist' {c -(}
{txt} 11{com}.         clear 
{txt} 12{com}.         set obs 2
{txt} 13{com}.         gen `item' = _n == 1
{txt} 14{com}.         cross using `crossed'
{txt} 15{com}.         save `crossed', replace
{txt} 16{com}.     {c )-}
{txt} 17{com}.     count if year == 2009 
{txt} 18{com}.     local scenario_count = r(N)
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 23{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 24{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 25{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 26{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 27{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 28{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 29{com}. 
.     //run the simulation
.     include "../Data_Cleaning/Policy_Coding_Function_Min.do"
{txt} 30{com}. 
.     //count the number of banned scenarios by year
.     gcollapse (sum) ban_*, by(year)
{txt} 31{com}. 
.     greshape long ban_, i(year) j(BankID)
{txt} 32{com}. 
.     rename ban_ banned_scenario_count
{txt} 33{com}.     gen ban_intensity = banned_scenario_count/`scenario_count'
{txt} 34{com}. 
.     sort BankID year
{txt} 35{com}.     order BankID year
{txt} 36{com}. 
. end
{txt}
{com}. 
. 
. 
. 
. capture program drop policy_sim_univariate_min
{txt}
{com}. program policy_sim_univariate_min
{txt}  1{com}.     version 16
{txt}  2{com}.     syntax name
{txt}  3{com}. 
.     set varabbrev off
{txt}  4{com}.     //display "`namelist'"
. 
.     //the idea is to see if there is a policy that in SOME way bans a certain variable
.     // to do this, we simulate all combinations of indicator variables except the one 
.     // in question. and then see if any of these are sensitive to changing the variable
.     // that is in question.
. 
.     local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                    isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  5{com}. 
.     local allelse: list fulllist-namelist
{txt}  6{com}. 
.     clear
{txt}  7{com}.     tempfile crossed
{txt}  8{com}.     clear 
{txt}  9{com}.     set obs 22
{txt} 10{com}.     gen year = 2008+_n
{txt} 11{com}.     save `crossed'
{txt} 12{com}. 
.     //make 2^n observations of all possible combinations of above binary variables
.     foreach item in `allelse' {c -(}
{txt} 13{com}.         clear 
{txt} 14{com}.         set obs 2
{txt} 15{com}.         gen `item' = _n == 1
{txt} 16{com}.         cross using `crossed'
{txt} 17{com}.         save `crossed', replace
{txt} 18{com}.     {c )-}
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
. 
.     //try these for the variable in question = 1 
.     gen `namelist' = 0
{txt} 23{com}. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 24{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 25{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 26{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 27{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 28{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 29{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 30{com}. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function_Min.do"
{txt} 31{com}.     rename ban_* v0_ban_*
{txt} 32{com}. 
.     replace `namelist' = 1
{txt} 33{com}. 
.     //drop impossible scenarios (incase flipping namelist from 0 to 1 created a new impossible scenario)
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 34{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 35{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 36{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 37{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 38{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 39{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 40{com}. 
. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function_Min.do"
{txt} 41{com}.     rename ban_* v1_ban_*
{txt} 42{com}. 
.     gen x = _n
{txt} 43{com}. 
.     keep x year *_ban_*
{txt} 44{com}. 
.     greshape long v0_ban_ v1_ban_, i(x year) j(BankID)
{txt} 45{com}. 
.     replace v0_ban_ = 0 if missing(v0_ban_)
{txt} 46{com}.     replace v1_ban_ = 0 if missing(v1_ban_)
{txt} 47{com}.     gen vdiff = v1_ban_ - v0_ban_
{txt} 48{com}.     gcollapse (mean) vdiff, by(BankID year)
{txt} 49{com}. 
. end
{txt}
{com}. {txt}
{com}. 
. 
. 
. local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
> isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}
{com}. 
. 
. tempfile time
{txt}
{com}. clear 
{txt}
{com}. set obs 22
{txt}{p}
Number of observations ({bf:_N}) was 0,
now 22.
{p_end}

{com}. gen year = 2008+_n
{txt}
{com}. save `time'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000008{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use ../Raw/Bank_Sample/BankSample_List, clear 
{txt}
{com}. cross using `time'
{txt}
{com}. tempfile banktrack 
{txt}
{com}. save `banktrack'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}

{com}. 
. foreach var in `fulllist' {c -(}
{txt}  2{com}.         di "`var'"
{txt}  3{com}.         qui policy_sim_univariate `var'
{txt}  4{com}.         merge 1:1 BankID year using `banktrack', keep(2 3) nogen
{txt}  5{com}.         order vdiff, after(n_ijg_trans)
{txt}  6{com}.         gen `var' = abs(vdiff) > 0 & ~missing(vdiff)
{txt}  7{com}.         rename vdiff `var'_frac
{txt}  8{com}.         save `banktrack', replace
{txt}  9{com}. {c )-}
isNew
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isExpansion
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isMiningProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isPowerProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isMountaintopProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isMountaintopComp
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isHighCarbonProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isNewCustomer
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isProjFin
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isThermal
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
hasNoDecarbonStrat
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isMiningCo
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isPowerCo
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
isCorpFin
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
CoalFracRevParent
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}
CoalSharePowerParent
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000009{rm}
saved
as .dta format
{p_end}

{com}. foreach var in `fulllist' {c -(}
{txt}  2{com}.         di "`var'"
{txt}  3{com}.         rename `var'_frac frac_sens_`var'
{txt}  4{com}.         rename `var' is_sens_`var'
{txt}  5{com}. {c )-}
isNew
{res}isExpansion
isMiningProj
isPowerProj
isMountaintopProj
isMountaintopComp
isHighCarbonProj
isNewCustomer
isProjFin
isThermal
hasNoDecarbonStrat
isMiningCo
isPowerCo
isCorpFin
CoalFracRevParent
CoalSharePowerParent
{txt}
{com}. drop source BankName n_ds_trans n_ijg_trans 
{txt}
{com}. 
. 
. save ../Intermediate/policy_sensitivities_yearly, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/policy_sensitivities_yearly.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/policy_sensitivities_yearly.dta{rm}
saved
{p_end}

{com}. 
. 
. ***********************************************************************
. ** BUILD OUT SENSITIVITY WITH INTIAL POLCIES ONLY
. ***********************************************************************
. //initialize functions to check policies on a certain variable 
. clear
{txt}
{com}. include "../Data_Cleaning/Policy_Simulation_Programs.do"
{txt}
{com}. capture program drop policy_sim_strength
{txt}
{com}. program policy_sim_strength
{txt}  1{com}.         version 16
{txt}  2{com}. 
.         set varabbrev off
{txt}  3{com}. 
.         //the idea is to see what fraction of all possible combination of variables are banned by each bank
.     // and use this as a crude measure of the policy strength
. 
.         local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                            isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  4{com}. 
.         clear
{txt}  5{com}.     tempfile crossed
{txt}  6{com}.     clear 
{txt}  7{com}.     set obs 22
{txt}  8{com}.     gen year = 2008+_n
{txt}  9{com}.     save `crossed'
{txt} 10{com}. 
.     foreach item in `fulllist' {c -(}
{txt} 11{com}.         clear 
{txt} 12{com}.         set obs 2
{txt} 13{com}.         gen `item' = _n == 1
{txt} 14{com}.         cross using `crossed'
{txt} 15{com}.         save `crossed', replace
{txt} 16{com}.     {c )-}
{txt} 17{com}.     count if year == 2009 
{txt} 18{com}.     local scenario_count = r(N)
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 23{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 24{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 25{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 26{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 27{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 28{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 29{com}. 
.     //run the simulation
.     include "../Data_Cleaning/Policy_Coding_Function.do"
{txt} 30{com}. 
.     //count the number of banned scenarios by year
.     gcollapse (sum) ban_*, by(year)
{txt} 31{com}. 
.     greshape long ban_, i(year) j(BankID)
{txt} 32{com}. 
.     rename ban_ banned_scenario_count
{txt} 33{com}.     gen ban_intensity = banned_scenario_count/`scenario_count'
{txt} 34{com}. 
.     sort BankID year
{txt} 35{com}.     order BankID year
{txt} 36{com}. 
. end
{txt}
{com}. 
. 
. capture program drop policy_sim_univariate
{txt}
{com}. 
. program policy_sim_univariate
{txt}  1{com}.     version 16
{txt}  2{com}.     syntax name
{txt}  3{com}. 
.     set varabbrev off
{txt}  4{com}.     //display "`namelist'"
. 
.     //the idea is to see if there is a policy that in SOME way bans a certain variable
.     // to do this, we simulate all combinations of indicator variables except the one 
.     // in question. and then see if any of these are sensitive to changing the variable
.     // that is in question.
. 
.     local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                    isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  5{com}. 
.     local allelse: list fulllist-namelist
{txt}  6{com}. 
.     clear
{txt}  7{com}.     tempfile crossed
{txt}  8{com}.     clear 
{txt}  9{com}.     set obs 22
{txt} 10{com}.     gen year = 2008+_n
{txt} 11{com}.     save `crossed'
{txt} 12{com}. 
.     //make 2^n observations of all possible combinations of above binary variables
.     foreach item in `allelse' {c -(}
{txt} 13{com}.         clear 
{txt} 14{com}.         set obs 2
{txt} 15{com}.         gen `item' = _n == 1
{txt} 16{com}.         cross using `crossed'
{txt} 17{com}.         save `crossed', replace
{txt} 18{com}.     {c )-}
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
. 
.     //try these for the variable in question = 1 
.     gen `namelist' = 0
{txt} 23{com}. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 24{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 25{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 26{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 27{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 28{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 29{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 30{com}. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function.do"
{txt} 31{com}.     rename ban_* v0_ban_*
{txt} 32{com}. 
.     replace `namelist' = 1
{txt} 33{com}. 
.     //drop impossible scenarios (incase flipping namelist from 0 to 1 created a new impossible scenario)
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 34{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 35{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 36{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 37{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 38{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 39{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 40{com}. 
. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function"
{txt} 41{com}.     rename ban_* v1_ban_*
{txt} 42{com}. 
.     gen x = _n
{txt} 43{com}. 
.     keep x year *_ban_*
{txt} 44{com}. 
.     greshape long v0_ban_ v1_ban_, i(x year) j(BankID)
{txt} 45{com}. 
.     replace v0_ban_ = 0 if missing(v0_ban_)
{txt} 46{com}.     replace v1_ban_ = 0 if missing(v1_ban_)
{txt} 47{com}.     gen vdiff = v1_ban_ - v0_ban_
{txt} 48{com}.     gcollapse (mean) vdiff, by(BankID year)
{txt} 49{com}. 
. end
{txt}
{com}. 
. 
. 
. capture program drop policy_sim_strength_min
{txt}
{com}. program policy_sim_strength_min
{txt}  1{com}.         version 16
{txt}  2{com}. 
.         set varabbrev off
{txt}  3{com}. 
.         //the idea is to see what fraction of all possible combination of variables are banned by each bank
.     // and use this as a crude measure of the policy strength
. 
.         local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                            isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  4{com}. 
.         clear
{txt}  5{com}.     tempfile crossed
{txt}  6{com}.     clear 
{txt}  7{com}.     set obs 22
{txt}  8{com}.     gen year = 2008+_n
{txt}  9{com}.     save `crossed'
{txt} 10{com}. 
.     foreach item in `fulllist' {c -(}
{txt} 11{com}.         clear 
{txt} 12{com}.         set obs 2
{txt} 13{com}.         gen `item' = _n == 1
{txt} 14{com}.         cross using `crossed'
{txt} 15{com}.         save `crossed', replace
{txt} 16{com}.     {c )-}
{txt} 17{com}.     count if year == 2009 
{txt} 18{com}.     local scenario_count = r(N)
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 23{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 24{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 25{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 26{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 27{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 28{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 29{com}. 
.     //run the simulation
.     include "../Data_Cleaning/Policy_Coding_Function_Min.do"
{txt} 30{com}. 
.     //count the number of banned scenarios by year
.     gcollapse (sum) ban_*, by(year)
{txt} 31{com}. 
.     greshape long ban_, i(year) j(BankID)
{txt} 32{com}. 
.     rename ban_ banned_scenario_count
{txt} 33{com}.     gen ban_intensity = banned_scenario_count/`scenario_count'
{txt} 34{com}. 
.     sort BankID year
{txt} 35{com}.     order BankID year
{txt} 36{com}. 
. end
{txt}
{com}. 
. 
. 
. 
. capture program drop policy_sim_univariate_min
{txt}
{com}. program policy_sim_univariate_min
{txt}  1{com}.     version 16
{txt}  2{com}.     syntax name
{txt}  3{com}. 
.     set varabbrev off
{txt}  4{com}.     //display "`namelist'"
. 
.     //the idea is to see if there is a policy that in SOME way bans a certain variable
.     // to do this, we simulate all combinations of indicator variables except the one 
.     // in question. and then see if any of these are sensitive to changing the variable
.     // that is in question.
. 
.     local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
>                    isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}  5{com}. 
.     local allelse: list fulllist-namelist
{txt}  6{com}. 
.     clear
{txt}  7{com}.     tempfile crossed
{txt}  8{com}.     clear 
{txt}  9{com}.     set obs 22
{txt} 10{com}.     gen year = 2008+_n
{txt} 11{com}.     save `crossed'
{txt} 12{com}. 
.     //make 2^n observations of all possible combinations of above binary variables
.     foreach item in `allelse' {c -(}
{txt} 13{com}.         clear 
{txt} 14{com}.         set obs 2
{txt} 15{com}.         gen `item' = _n == 1
{txt} 16{com}.         cross using `crossed'
{txt} 17{com}.         save `crossed', replace
{txt} 18{com}.     {c )-}
{txt} 19{com}. 
.     gen CountryParent = ""
{txt} 20{com}.     gen CountryGroup = ""
{txt} 21{com}.     gen ContinentParent = ""
{txt} 22{com}. 
. 
. 
.     //try these for the variable in question = 1 
.     gen `namelist' = 0
{txt} 23{com}. 
.     //drop impossible scenarios:
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 24{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 25{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 26{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 27{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 28{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 29{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 30{com}. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function_Min.do"
{txt} 31{com}.     rename ban_* v0_ban_*
{txt} 32{com}. 
.     replace `namelist' = 1
{txt} 33{com}. 
.     //drop impossible scenarios (incase flipping namelist from 0 to 1 created a new impossible scenario)
.     drop if isMiningCo == 0 & isMountaintopComp == 1
{txt} 34{com}.     drop if isMiningProj == 0 & isMountaintopProj == 1
{txt} 35{com}.     drop if isMiningProj == 1 & isPowerProj == 1
{txt} 36{com}.     drop if isNew == 1 & isExpansion == 1
{txt} 37{com}.     drop if isCorpFin == 1 & isProjFin == 1
{txt} 38{com}.     drop if isPowerProj == 1 & isThermal == 0
{txt} 39{com}.     drop if isPowerCo == 1 & isThermal == 0
{txt} 40{com}. 
. 
. 
.     include "../Data_Cleaning/Policy_Coding_Function_Min.do"
{txt} 41{com}.     rename ban_* v1_ban_*
{txt} 42{com}. 
.     gen x = _n
{txt} 43{com}. 
.     keep x year *_ban_*
{txt} 44{com}. 
.     greshape long v0_ban_ v1_ban_, i(x year) j(BankID)
{txt} 45{com}. 
.     replace v0_ban_ = 0 if missing(v0_ban_)
{txt} 46{com}.     replace v1_ban_ = 0 if missing(v1_ban_)
{txt} 47{com}.     gen vdiff = v1_ban_ - v0_ban_
{txt} 48{com}.     gcollapse (mean) vdiff, by(BankID year)
{txt} 49{com}. 
. end
{txt}
{com}. {txt}
{com}. 
. 
. 
. local fulllist isNew isExpansion isMiningProj isPowerProj isMountaintopProj isMountaintopComp isHighCarbonProj isNewCustomer ///
> isProjFin isThermal hasNoDecarbonStrat isMiningCo isPowerCo isCorpFin CoalFracRevParent CoalSharePowerParent
{txt}
{com}. 
. 
. tempfile time
{txt}
{com}. clear 
{txt}
{com}. set obs 22
{txt}{p}
Number of observations ({bf:_N}) was 0,
now 22.
{p_end}

{com}. gen year = 2008+_n
{txt}
{com}. save `time'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000a{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use ../Raw/Bank_Sample/BankSample_List, clear 
{txt}
{com}. cross using `time'
{txt}
{com}. tempfile banktrack 
{txt}
{com}. save `banktrack'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}

{com}. 
. foreach var in `fulllist' {c -(}
{txt}  2{com}.         di "`var'"
{txt}  3{com}.         qui policy_sim_univariate_min `var'
{txt}  4{com}.         merge 1:1 BankID year using `banktrack', keep(2 3) nogen
{txt}  5{com}.         order vdiff, after(n_ijg_trans)
{txt}  6{com}.         gen `var' = abs(vdiff) > 0 & ~missing(vdiff)
{txt}  7{com}.         rename vdiff `var'_frac
{txt}  8{com}.         save `banktrack', replace
{txt}  9{com}. {c )-}
isNew
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isExpansion
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isMiningProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isPowerProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isMountaintopProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isMountaintopComp
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isHighCarbonProj
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isNewCustomer
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isProjFin
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isThermal
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
hasNoDecarbonStrat
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isMiningCo
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isPowerCo
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
isCorpFin
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
CoalFracRevParent
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}
CoalSharePowerParent
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}         298,518{txt}  

{col 5}Matched{col 30}{res}           1,672{txt}  
{col 5}{hline 41}
{res}{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000b{rm}
saved
as .dta format
{p_end}

{com}. foreach var in `fulllist' {c -(}
{txt}  2{com}.         di "`var'"
{txt}  3{com}.         rename `var'_frac i_frac_sens_`var'
{txt}  4{com}.         rename `var' i_is_sens_`var'
{txt}  5{com}. {c )-}
isNew
{res}isExpansion
isMiningProj
isPowerProj
isMountaintopProj
isMountaintopComp
isHighCarbonProj
isNewCustomer
isProjFin
isThermal
hasNoDecarbonStrat
isMiningCo
isPowerCo
isCorpFin
CoalFracRevParent
CoalSharePowerParent
{txt}
{com}. drop source BankName n_ds_trans n_ijg_trans  
{txt}
{com}. 
. save ../Intermediate/policy_sensitivities_yearly_initial, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/policy_sensitivities_yearly_initial.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/policy_sensitivities_yearly_initial.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. 
. ***********************************************************************
. ** BUILD OUT YEARLY POLICY INTENSITY
. ***********************************************************************
. //get policy strength by bank-year via unweighted simulation
. policy_sim_strength
{txt}{p}
Number of observations ({bf:_N}) was 0,
now 22.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
{p}
Number of observations ({bf:_N}) was 0,
now 2.
{p_end}
{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}
  {res}65,536
{txt}(1,441,792 missing values generated)
(1,441,792 missing values generated)
(1,441,792 missing values generated)
(360,448 observations deleted)
(270,336 observations deleted)
(270,336 observations deleted)
(135,168 observations deleted)
(101,376 observations deleted)
(38,016 observations deleted)
(57,024 observations deleted)

{com}. /*
> //DG's starting template for Coal Divestment policy coding.
> 
> Variables we will use to start in the policy definitions:
> (numbers in paranthesis indicates number of banks using this criteria)
> 
>         isProjFin:                                      = 1 for project finance
>         isCorpFin:                                      = 1 for corporate finance (3)
>         ContinentParent:                        {c -(}Africa, Asia, Europe, North America, South America, Australia{c )-} 
>         CountryParent:                          {c -(}any country name{c )-} Update: 9/15/2021 
>         
>         CoalFracRevParent:                      = fraction of revenue from coal of parent company
>         CoalSharePowerParent:           = coal share of power production of parent company
> 
>         isMiningCo:                                     = is company a mining company
>         isPowerCo:                                      = is company a power company
>         isMiningProj:                           = is project a mining project
>         isPowerProj:                            = is project a power project
> 
>         isNewCustomer                           = is the borrower a new customer?
> 
>         isLignite:                                      = is the project using lignite coal?
>         isThermal:                                      = is the project using thermal coal?
> 
>         isExpansion:                            = are proceeds used for expansion of capacity/life of coal assets?
>         isNew:                                          = are proceeds used for new coal ASSETS?
>         isLowCarbonProj:                        = are proceeds used for carbon transition / low carbon project
>         isMountaintopProj:                      = are proceeds used for mountaintop mining?
>         isMountaintopComp:                      = is company doing mountaintop mining? (6)
> 
>         hasDecarbonStrat:                       = Company has plan to decarbonize/diversify from carbon
>         
>         year:                                           = when is the financing happening
>         
>         CountryGroup                            = Option for group of countries in some
>                                                                   policies eg: OECD             
> */
. 
. * POLICY 1: XX BANK, YY YEAR
. *                       local path to pdf of policy document
. // use "temp", clear 
. // gen CountryGroup = " "
. //
. 
. 
. ***ABN AMRO
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ABN_AMRO_Exclusion_list.pdf
. gen ban_15000 = 1 if (year >= 2016 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1)) | isMountaintopProj==1)) 
{txt}(148,608 missing values generated)

{com}. 
. ** ABSA*
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ABSA_coal-financing-standard.pdf
. gen ban_50 = 1 if (year >= 2020 & isNew == 1 & isPowerProj == 1) 
{txt}(202,752 missing values generated)

{com}. *carveouts if no reasonable cost alternative exists or if project is compliant with Equator Principles (EP)
. 
. ** ANZ*
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ANZ_2020.pdf 
. gen ban_967 = 1 if ((year >= 2030 & isHighCarbonProj==1) | /// after 2030, all direct finance only for low carbon projects 
>                                         (year >= 2020 & ((isNewCustomer==1 & CoalFracRevParent > 0.1) |                 /// after 2020, no new customers with material thermal coal exposures
>                                         (isNew==1 | isExpansion==1))) | ///  after 2020, no direct financing of new or expansion coal power or mining 
>                                         (year >= 2018 & ((isMiningProj==1 & isNew==1) |         ///no financing for new conventional coal-fired power stations
>                                         (CoalFracRevParent > 0.5))))
{txt}(109,944 missing values generated)

{com}.                            
. ***** Bank of America*
. gen ban_1869 = 1 if (((year >= 2021 & ((isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj==1) | /// Ban construction or expansion of new coal fired powerplants - unless they have a low carbon project.
>                                 (isMiningProj==1 & (isNew==1 | isExpansion==1)) |                                                               /// Ban new coal mines or expansion of existing coal mines
>                                 (isMountaintopComp==1))) | ///
>                                 (year >= 2025 & (isThermal==1 & isMiningCo==1 & CoalFracRevParent>0.25 & hasNoDecarbonStrat==1)))) // Starting 2025 will ban clients having more than 25% of revenue from thermal mining that do not have decarbonization strategy
{txt}(148,512 missing values generated)

{com}.         
. **** Barclays*
. gen ban_2263 = 1 if (((year >= 2019 & (isProjFin==1 & isPowerProj==1 & (isNew==1 | isExpansion==1) | /// No project finance to enable the construction or material expansion of coal-fired power stations anywhere in the world  
>                                 (isProjFin==1 & isMiningProj==1 & isThermal==1 & (isNew==1 | isExpansion==1)) | ///No project finance for the development of thermal coal mines anywhere in the world.
>                                 (isMountaintopProj==1))) | ///
>                                 (year>= 2020 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.5))) | ///From 2020 no financing to clients that generate more than 50% of revenue from thermal coal activities
>                                 (year >= 2025 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.3))) | /// 2025, no longer provide any financing to clients that generate more than 30% of revenue from thermal coal activities
>                                 (year >= 2030 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.1))))) //From 2020 no financing to clients that generate more than 10% of revenue from thermal coal activities
{txt}(148,528 missing values generated)

{com}. 
. 
. 
. **** BAYERN LB*
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Bayern_LB_sustainability_policy_2018.pdf
. gen ban_2311 = 1 if (year >= 2018 & (isMountaintopProj==1 )) //| isLignite==1))) 
{txt}(175,392 missing values generated)

{com}. * emphasis on banning lignite mining + power plants
. 
. 
. **** BBVA*
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\BBVA_Responsible_banking_2019.pdf
. gen ban_1043 = 1 if ((year >= 2019 & ((isNew==1 & (isMiningProj ==1 | isPowerProj==1 | isMountaintopProj==1)) |         /// No new Coal mines, New coal powerplants, New Montaintop removal projects.
>                                 (isExpansion==1 & (isMiningProj==1 | isPowerProj==1)) |                                         /// No mine , powerplant expansions.
>                                 (isMiningCo==1 & CoalFracRevParent >0.35 & hasNoDecarbonStrat==1) |                     /// Excluding clients with >35% revenue from mining without diversifivation strategy
>                                 (isPowerCo==1 & CoalFracRevParent>0.35 & hasNoDecarbonStrat==1))) | /// Excluding clients with >35% revenue from coal power without diversifivation strategy
>                                 (year >= 2018 & ((isNew==1 & (isPowerProj==1 | isMiningProj==1)) | /// would not finance any new coal mines and coal-fired power stations or extensions to existing ones
>                                 ((isMiningCo==1 | isPowerCo==1) & CoalSharePowerParent>= 0.4)))) // would exclude companies relying on coal for more than 40 per cent of their mining or power generation activity.     
{txt}(119,856 missing values generated)

{com}. 
. **** Bendingo and Adelaide bank*
. gen ban_2351 = 1 if ((year >= 2014 & (isMiningCo==1 | isPowerCo==1))) // Do not lend to projects in the coal sector
{txt}(81,792 missing values generated)

{com}. 
. 
. **** BNP Paribas *
. gen ban_1106 =1 if ((year > 2020 & (((isNew==1 | isExpansion==1) & isPowerProj==1) | /// No finance for new or expansion of power projects
>                           (isNewCustomer==1 & CoalFracRevParent> 0.25 & hasNoDecarbonStrat==1))) | /// No finance for new customers with more than 25% of revenue from mining and has no Diversification strat
>                           (year >=2017 & ((isNew==1 & isPowerProj==1) | ///
>                           (isPowerCo==1 & isExpansion == 1)))) 
{txt}(172,656 missing values generated)

{com}.                         
. ***** BPCE*
. gen ban_1124 = 1 if (((year> 2015 & (isThermal==1 & isProjFin==1)) | ///
>                            (year > 2019 & (isThermal==1 & ((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent >0.25))))) | ///
>                            (year>=2020 & (isNew==1 &(isPowerCo==1 | isMiningCo==1))) // Natixis will halt its relationships with clients that develop new capacity in coal-powered electricity generation or thermal coal mining. (PROBLEM)
{txt}(140,032 missing values generated)

{com}. 
. ***** Caixabank* Talk about credit risk
. gen ban_2869 = 1 if ((year >= 2019 & ((isMiningProj==1 & (isNew==1 | isExpansion==1)) | ///No credit risk in new or expansion of mining projects 
>                            (isMountaintopProj==1) |                                                                     /// No credit risk for Montaintop Removal Projects
>                            (isMiningCo==1 & CoalFracRevParent > 0.4 & hasNoDecarbonStrat==1) | ///no credit risk in new long-term transactions or arrangements requested by mining companies with over 40% revenue from coal mining and no diversification strategy.  
>                            (isPowerProj==1 & (isExpansion==1 | isNew==1)) |                ///No credit risk in new or expansion of power projects  
>                            (isPowerCo==1 & CoalFracRevParent> 0.4 & hasNoDecarbonStrat==1)))) //no credit risk in new long-term transactions or arrangements requested by coal-power companies with over 40% revenue from coal mining and no diversification strategy.
{txt}(133,920 missing values generated)

{com}. 
. ** CATHAY FINANCIAL ????
. 
. **** Chiba bank* - 
. gen ban_3388 = 1 if (year >= 2020 & (isNew==1 & isPowerProj==1)) // if the support of the Government of Japan, international development organizations, etc. can be confirmed then will consider financing. 
{txt}(202,752 missing values generated)

{com}. 
. 
. **** CIMB* 
. gen ban_2737 = 1 if ((year > 2020 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1) & hasNoDecarbonStrat==1) | /// No financing for new mining or powerprojects that do not have a decarbon strategy 
>                                 (isExpansion==1 & (isMiningProj==1 | isPowerProj==1))))) // No financing for expansion of mining or powerprojects that do not have a decarbon strategy 
{txt}(174,528 missing values generated)

{com}. 
. 
. ** Citi*
. gen ban_3536 = 1 if ((year >= 2021 & (( isThermal==1 & isProjFin==1 & (isNew==1|isExpansion==1) & isMiningProj==1) | /// New thermal coal mines or significant expansion of existing mines;
>                                          (isProjFin==1 & (isNew==1|isExpansion==1) & isPowerProj==1) | ///New coal-fired power plants or expansion of existing plants
>                                          (isMiningCo==1 & isThermal==1 & CoalFracRevParent >= 0.25) | ///targets to phase out our financing of mining companies deriving ≥25% of their revenue from thermal coal mining
>                                          (isPowerCo==1 & isHighCarbonProj == 1) | ///
>                                          (isNewCustomer==1 & (CoalSharePowerParent >= .2 & isHighCarbonProj==1) | ///Not onboard any new clients with ≥20%,
>                                          (isNewCustomer==1 & isExpansion==1)))) | /// Not onboard any new clients that have plans to expand coal-fired power generation
>                                          (year > 2025  & ((isPowerCo & CoalFracRevParent >= 0.05 & isNewCustomer == 1) | ///
>                                          (isMiningCo & isCorpFin))) | ///
>                                          (year > 2030 & ((isPowerCo & CoalFracRevParent>= 0.05 & CountryGroup == "OECD") | ///
>                                          (isMiningCo))) | ///
>                                          (year >=2015 & isMiningCo==1 & CoalFracRevParent >= 0.5))
{txt}(127,060 missing values generated)

{com}.                                         
. 
. 
. ***** Commerzbank*
. gen ban_3731 = 1 if (((year >= 2020 & ((isNew ==1 & (isMiningProj==1 | isPowerProj==1)) | ///No financing for new mining projects
>                                 (isMountaintopComp==1))) | ///No Financing for mountaintop companies
>                                 (year>2021 & ((isPowerCo==1 & CoalSharePowerParent > 0.30 & CountryParent == "Germany") | ///German clients from the energy supply sector to limit the share of electricity generated from coal (based on their production performance) to below 30 per cent bythe end of 2021
>                                 (isPowerCo==1 & CoalSharePowerParent>0.5))) | /// For ROW 
>                                 (year > 2016 & ((isNewCustomer==1 & isPowerCo==1 & CoalSharePowerParent> 0.3 & CountryParent == "Germany") | /// For new clients, the above is enacted since 2016
>                                 (isNewCustomer==1 & isPowerCo==1 & CoalSharePowerParent>0.5)))))
{txt}(146,112 missing values generated)

{com}.                 
. 
. *** CommonwealthBank
. * No defined criteria for exclusions
. 
. 
. **** Concordia- Unknown year and Synthetic_Bank_ID
. // gen ban = 1 if (isNew==1 & isPowerProj==1 & isHighCarbonProj==1) 
. 
. 
. **** CPEG, documents in french. No loans in our datasets
. 
. **** Credit Agricole*
. gen ban_981 =1 if  ( ///
>                                         (year >= 2020 & ((isNewCustomer==1 & isMiningCo==1 & isThermal==1 & CoalFracRevParent> 0.25==1 & hasNoDecarbonStrat==1) | /// Will not develop relations with companies that generate more than 25% of their turnover in the thermal coal industry and have not adopted a transition strategy  
>                                                                          (isNewCustomer==1 & isThermal==1 & isPowerCo==1 & (isNew==1 | isExpansion==1)) |  /// the Bank will not enter into relationships with companies developing or planning to develop new thermal coal capacities 
>                                                                          (isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No finance for new or exapnding power plants
>                                                                  (isThermal==1 & (isMiningCo==1 & CoalFracRevParent >0.25) & hasNoDecarbonStrat==1) | ///issuers generating more than 25% of their turnover from thermal coal extraction are divested
>                                                                          (  (  (isMiningCo==1 & CoalFracRevParent >0.5) | (isPowerCo==1 & CoalFracRevParent>0.5)) & hasNoDecarbonStrat==1)) ///
>                                         ) ///
>                                         | ///issuers generating more than 50% of their turnover from coal sector are divested 
>                                         (year >= 2019 & ((isNewCustomer==1 & CoalFracRevParent>0.25) | ///Credit Agricole will also exclude new clients with more than 25% activity in the coal sector, and will only support existing clients above this threshold with dedicated project financing to non-coal projects
>                                                                          (isExpansion==1)) ///
>                                         ) ///
>                                         | ///Credit Agricole also ends all supports to companies expanding or planning to expand their activities in the coal sector, from coal extraction to coal power production
>                                         (year > 2016 & ((isNew==1 | isExpansion==1) & isPowerProj==1) ///
>                                         ) ///
>                                    ) ///
> 
{txt}(135,996 missing values generated)

{com}. */
. 
. **** Credit Mutuel*
. *PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Credit_Mutuel_2020.pdf
. gen ban_2726 = 1 if (year >=2020 & ((isExpansion==1 & (isMiningProj==1 | isPowerProj==1)) | /// Banning any company expanding activities in the coal sector
>                            ((isMiningCo==1|isPowerCo==1) & CoalFracRevParent>0.20) |                                            /// Banning company with coal revenue >20% 
>                            ((isPowerCo==1|isMiningCo==1) & CoalSharePowerParent > 0.20) |                                       /// Banning company with coal's energy mix > 20%
>                            (hasNoDecarbonStrat==1))) |                                                                          /// Continue financing for clients that do have a Diversification Strategy 
>                                 (year >= 2019 & ((isNew==1 & isPowerProj==1) | ///Crédit Mutuel Alliance Fédérale states that it intends to refrain from participating in operations related to the building of new coal-fired power plant
>                                 (CoalFracRevParent >= 0.5 & (isMiningCo==1 | isPowerCo==1)) | ///refrain from entering into relations with companies whose main activity consists in coal mining or is over 50% related to coal sector activities
>                                 (isHighCarbonProj == 1)))       
{txt}(105,276 missing values generated)

{com}.                                 
. ***** Credit_Suisse*
. gen ban_3966 = 1 if (((year > 2016 & (isMountaintopProj==1)) | /// No finances for Mountaintop Projects 
>                                 (year>2017 & ((isThermal==1 & isNew==1 & isMiningProj==1) | /// No financing for new thermal mines
>                                 (isPowerProj==1 & isNew==1 & isHighCarbonProj==1))) | /// No financing for new coal power plants unless low carbon technology used
>                                 (year >= 2020 & ((isMiningCo==1 & CoalFracRevParent>0.25 & isThermal==1 & hasNoDecarbonStrat==1) | /// No financing for thermal mining companies having more than 25% of revenue from coal and does not have a diversification strat -- date from yann louvel excel file
>                                 (isPowerCo==1 & CoalFracRevParent>0.25 & hasNoDecarbonStrat==1 ))))) // No financing for Coal Power plant companies having more than 25% of revenue from coal and does not have a diversification strat.
{txt}(151,668 missing values generated)

{com}. 
. *** Dai_ichi Life *
. gen ban_4128 = 1 if ((year > 2019 & (isPowerProj==1))) // general excercise to refrain from lending financial support to coal power projects
{txt}(190,080 missing values generated)

{com}. 
. 
. **** Danske Bank*
. gen ban_4176 = 1 if ((year >2021 & ((isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.05) |  /// No financing for thermal coal mines with revenue > 0.05
>                            (isPowerCo==1 & CoalFracRevParent> 0.05)))) //No financing for coal power companies with revenue > 0.05
{txt}(183,168 missing values generated)

{com}.                 
. **** DBS*
. gen ban_4309 =1 if ((year > 2020 & ((isNew==1 & isPowerProj==1) | /// No financing on new coal-fired power plants
>                           (hasNoDecarbonStrat==1) | /// Only support customers with a diversification strategy
>                           (isNew==1 & isProjFin==1 & isThermal==1 & isMiningProj==1) | /// Stopping project financing of greenfield thermal coal mines
>                           (isThermal==1 & isMiningCo==1 & CoalFracRevParent == 1.00)))) // Stopping financing of pure play thermal coal mining, processing, trading, construction and operation of thermal coal power plants 
{txt}(146,848 missing values generated)

{com}. 
. **** Deka* 
. gen ban_4229 = 1 if ((year > 2019 & ((isNew==1 | isExpansion==1) & isPowerProj==1))) // Development, construction and operation of coal-fired power plants
{txt}(196,416 missing values generated)

{com}. 
. **** Desjardins*
. gen ban_2683 = 1 if ((year > 2020 & ((isMiningCo==1) | /// Operate or develop coal mines
>                            (isPowerCo ==1 & CoalSharePowerParent>0.1) | /// Have greater than 10%, or 5 GW, installed coal power generation capacity
>                            ((isNew==1 | isExpansion==1) & isPowerCo==1)))) // Are building, extending or renovating coal mines, power plants or infrastructure.
{txt}(136,128 missing values generated)

{com}.                            
. **** Deutsche Bank*
. gen ban_4293 = 1 if (((year > 2016 & (isPowerProj==1 & (isNew==1 | isExpansion==1))) | ///
>                            (year > 2020 & ((isMountaintopProj==1 & CountryParent == "USA") | /// No financing for MTR projects in the USA
>                            (isPowerCo==1 & CoalFracRevParent > 0.5 & hasNoDecarbonStrat==1 & ContinentParent != "Asia") | /// Not provide finances for companies with more than 50% revenue and not have decarbonization strategy. 2020 for all continents except for Asia.
>                            (isMiningProj==1 & isThermal==1 & isNew==1)))  | ///not provide any financing for greenfield thermal coal mining
>                            (year>=2022 & isPowerCo==1 & CoalFracRevParent > 0.5 & hasNoDecarbonStrat==1 & ContinentParent == "Asia"))) // 2022 for asia
{txt}(175,680 missing values generated)

{com}. 
. **** DNB*
. gen ban_4100 = 1 if ((year > 2016 & ((isProjFin==1 & isPowerProj==1) | /// No project Finance for coal fired power plant
>                                 (isNew==1 & isPowerCo==1 & CoalFracRevParent > 0.3)))) // New customers with more than 30% share of rev from coal fired power plants
{txt}(193,632 missing values generated)

{com}.                                                                                         
. ***** DZ Bank*
. gen ban_4107 = 1 if (((year > 2017 & (isProjFin==1 & isPowerProj==1)) | ///
>                            (year > 2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No financing of new or existing coal-fired power plants
>                            (isMiningCo==1 & isThermal==1) |  ///No financing of activities upstream in the value chain for thermal coal, especially mining, trade and directly related activities
>                            (hasNoDecarbonStrat==1))))) // No indirect financing of companies with an increased share of coal if no will to transform is evident or if the use of funds for coal can be ruled out
{txt}(134,560 missing values generated)

{com}.                            
. **** E.Sun*
. gen ban_4462 = 1 if ((year > 2019 & (isPowerProj==1 & (isNew==1 | isExpansion==1))))
{txt}(196,416 missing values generated)

{com}. 
. 
. **** Erste Group*
. gen ban_1261 = 1 if (((year >= 2021 & ((isMiningProj==1 |isPowerProj==1) & (isNew==1 | isExpansion==1) | ///Direct financing of coal-asset specific investments or cash flows related to coal mining, coal processing, coke processing or coal based power generation
>                         (isCorpFin==1 & isExpansion==1 & (isMiningCo==1 | isPowerCo==1)) | /// Corporate financing for companies or group of companies which extend their coal mining or coalbased power generation (installed) capacities
>                         (isCorpFin==1 & ((isMiningCo==1 & CoalFracRevParent>0.25 ) | (isPowerCo==1 & CoalFracRevParent>0.25))))) |  ///Corporate financing for companies or group of companies which have more than 25% of revenues coming from coal sector
>                         (year > 2023 & hasNoDecarbonStrat==1 & isCorpFin==1))) //Corporate financing for companies or group of companies which do not set up until end of 2023 a transition plan aligned with the 2030 phase out target
{txt}(152,408 missing values generated)

{com}. 
. **** Goldman Sachs* -- Date from Yann louvel reclaim finance
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Goldman_Sachs_2020.pdf
. gen ban_5853 = 1 if ((year > 2019 & ((isNew==1 & isPowerProj==1 & isHighCarbonProj==1) | /// No financing for new coal power plants that do not have low carbon policies
>                                 (isNew==1 & isMiningProj==1) |                                                                  /// No financing for new thermal coal mine
>                                 ((isNew==1 | isExpansion==1) & isMountaintopProj==1))))                                 // No Financing for MTR projects 
{txt}(177,408 missing values generated)

{com}.   
. **** Handelsbanken* 
. gen ban_6253 = 1 if ((year > 2019 & ((isMiningProj==1 | isPowerCo==1) & (isNew==1 | isExpansion==1) | /// No financing for new or developing Coal power plants or mines
>                            (isNewCustomer==1 & !hasNoDecarbonStrat==1)))) // Not deelop relations with clients active in coal sector and do not have a transition policy
{txt}(144,936 missing values generated)

{com}.         
. **** Hannoversche Beteiligungsgesellschaft- Synthetic_Bank_ID not known. No transactions.
. //gen ban_XX = 1 if ((year > 2019 & (isPowerProj))) ///Financing the construction of conventional coal-fired power plants.
. 
.            
. ****HSBC* 
. gen ban_6184 = 1 if (((year >= 2020 & (((isNew==1 |isExpansion==1) & isMiningProj==1) |                 /// No Financing for New or expansion of existing mining projects
>                         (isNewCustomer==1 & isMiningCo==1 & CoalFracRevParent > 0.5) |          /// Not take any new customers dependent (>50% of coal revenue) from coal
>                         (isMountaintopComp==1 & CountryParent == "USA") |                                       /// No finance for MTR firms in the USA
>                         (isMountaintopProj==1 & isMiningProj==1) |                                                      /// No finance for Mountaintop mines 
>                         ((isNew==1 | isExpansion==1) & isPowerProj==1 & isHighCarbonProj==1))) | ///
>                         (year >=2018 & (isNew==1 & isPowerProj==1 & (CountryParent != "Bangladesh" | CountryParent != "Indonesia" | CountryParent != "Vietnam")))))              // Banning finance for new or expanding power plants without a low carbon policy
{txt}(142,992 missing values generated)

{com}.         
. *** ING*
. gen ban_6757 = 1 if (((year >= 2019 & ((isNew==1 &(isMiningProj==1 | isPowerProj==1)) |                                                         /// No financing for new thermal coal power or coal mines
>                         (isNewCustomer==1 & (hasNoDecarbonStrat == 1 | CoalSharePowerParent> 0.1)))) |                          /// Ban new customers with sahre of power > 10%. Should also have a strat to reduce 5%
>                         (year >= 2025 & isPowerCo==1 & CoalFracRevParent > 0.05 ) | /// Ban Finance for all clients with coal revenue fraction less than 5%BY 2025 (How to code expectation of lower fraction in future?)
>                         (year > 2017 & CoalFracRevParent >0.1 & hasNoDecarbonStrat==1) | ///
>                         (year > 2015 & (isNew==1 & (isPowerProj==1 | (isThermal==1 & isMiningProj==1)) | ///
>                         (isNewCustomer==1 & CoalFracRevParent > 0.5)))))                                                                                
{txt}(118,908 missing values generated)

{com}.                    
. **** Intessa San Paolo* --- Date from Yann louvel excel file 
. gen ban_1317 = 1 if ((year >= 2020 & ((isNew==1 & isMiningProj==1) | ///
>                            (isMiningCo==1 & isMountaintopComp==1) | ///
>                            isPowerCo==1 & ((CoalSharePowerParent > 0.5 & CountryGroup == "Non-OECD") | (CoalSharePowerParent > 0.3 & CountryGroup == "OECD")))))
{txt}(161,568 missing values generated)

{com}. 
.                            
. **** Investec* 
. gen ban_7072 = 1 if ((year >=2020 & ((isMountaintopProj==1) | ///We will not finance mountaintop removal mining activities
>                            (isPowerProj==1 & isHighCarbonProj==1) |   ///Investec will not provide funding to new build of conventional plants*.
>                            (isExpansion==1 & hasNoDecarbonStrat==1))))   // not for expansion purposes unless it meets the required efficiency criteria  
{txt}(159,984 missing values generated)

{com}. 
. **** JPMorgan*
. gen ban_6179 = 1 if ((year >=2020 & ((isProjFin==1 & isNew==1 & isMiningProj==1) | /// No Project finance to develop new mines
>                            (isMiningCo==1 & CoalFracRevParent > .5) | ///Not provide lending, capital markets or advisory services to companies deriving the majority of their revenues from the extraction of coal
>                            (isMiningProj==1) | /// NO mountaintop projects
>                            (isPowerProj==1 & isProjFin==1 & isHighCarbonProj==1)))) | ///not provide project financing or other forms of asset-specific financing where the proceeds will be used to develop a new coal-fired power plant or refinance an existing coal-fired power plant
>                            ((year >= 2024 & isCorpFin == 1 & isMiningCo))
{txt}(130,752 missing values generated)

{com}.                            
.                            
. **** KB Financial* -- Date from Yann louvel excel file
. gen ban_7434 = 1 if ((year >2020 & (isProjFin==1 & isPowerProj==1 & isNew==1))) // Suspension of new project financing and bond underwriting for domestic and overseas coal-fired power plant construction
{txt}(207,168 missing values generated)

{com}. 
. ***** KBC* 
. gen ban_7439 = 1 if (((year > 2016 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1)) | ///
>                            (CountryParent == "Czech Republic" & isHighCarbonProj==1) | ///
>                            ((isPowerCo==1|isMiningCo==1) & CoalFracRevParent>0.5))) |                                 /// "2016 - No direct finance for coal mining and coal power projects worldwide, with an exception for Czech Republic. Exclusion of companies generating over 50% of their turnover from coal power."
>                            (year > 2018 & (((isPowerCo==1|isMiningCo==1) & CoalFracRevParent> 0.25) |                             /// "2018 - reduced to 25% and no finance without transition strat "
>                            (hasNoDecarbonStrat==1))) | ///
>                            (year >= 2020 & ((isNewCustomer==1 & isPowerCo==1 & CoalFracRevParent >= 0)))))  // "2020 - No new customer with any stake in coal"
{txt}(107,412 missing values generated)

{com}. 
. **** Kiwibank*
. gen ban_9432 = 1 if (year >= 2020 & (isMiningCo==1)) // banking services to entities that are directly involved in, or where the majority of their business revenue is from
{txt}(139,392 missing values generated)

{com}. 
. ** LBBW??
. 
. **** Lloyds Banking Group*
. gen ban_8286 =1 if ((year >= 2019 & ((isNew==1 & isPowerProj==1) | ///
>                            (isThermal==1 & isNew==1 & isMiningProj==1) | ///
>                            (isNewCustomer==1 & ((isMiningCo==1|isPowerCo==1) & CoalFracRevParent > 0.5)))))     // The Bank will not bank new clients where most of their revenue is  derived from coal-fired power stations or thermal coal mines                 
{txt}(170,208 missing values generated)

{com}.                 
. 
. **** mBank*
. gen ban_13818 = 1 if ((year>=2019 & (isNew==1 & (isMiningProj==1 | isPowerProj==1) | /// No financing for New mining or power projects
>                                 (isNewCustomer==1 & CoalSharePowerParent > 0.5)))) // Not engage with new clients with more than 50% in power generation capacity from coal
{txt}(159,840 missing values generated)

{com}.                                 
. 
. **** Mizuho* -- Date from Yann louvel excel file 
. gen ban_8939 = 1 if (((year >= 2020 & ((isNewCustomer==1 & (isNew==1 | isExpansion==1) & isPowerProj==1) | /// No financing for new customers for new powerprojects
>                            (isMountaintopProj==1))) | /// No financing for Mountaintop projects
>                            (year >= 2021 & (isNew==1 | isExpansion==1) & isPowerProj==1)))
{txt}(168,480 missing values generated)

{com}. 
. **** Morgan Stanley*
. gen ban_9031 = 1 if ((year >2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj==1) | ///We will not finance transactions globally that directly support the development of new or physical expansions of coal-fired power generation
>                                          (isMountaintopProj==1 & isMiningCo ==1) | ///
>                                          (isNew==1 & isThermal==1 & isMiningProj == 1))))
{txt}(178,368 missing values generated)

{com}. 
. ***** MUFG*
. gen ban_8917 = 1 if ((year >= 2020 & ((isNew==1 & isPowerProj==1) | ///MUFG will not provide financing to new coal fired power generation project
>                            (isMountaintopProj==1)))) //We will not provide any financing to coal mining projects using the mountaintop removal
{txt}(174,240 missing values generated)

{com}.                            
. **** NAB* 
. gen ban_9227 = 1 if ((year > 2017 & (isNew==1 & isThermal==1 & isMiningProj==1)) | /// No new thermal coal mines
>                            (year > 2019 & ((isThermal==1 & isNewCustomer==1 & isMiningProj==1) | /// New thermal coal mining projects or new-to-bank thermal coal mining customers.
>                            (isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj == 1 )))) // NAB will not finance new or material expansions of coal-fired power generation facilities unless there is technology in place to materially reduce emissions.
{txt}(175,104 missing values generated)

{com}. 
. ***** Natwest* 
. gen ban_11026 = 1 if (((year >= 2018 & ((isNew==1 & isPowerProj==1) |                                                   ///New coal fired power stations
>                                 (isThermal==1 & isMiningProj==1 & isNew==1) |                                                   ///New thermal coal mines
>                                 (isMiningCo==1 & isThermal==1 & CoalFracRevParent > 0.4) |                      ///Mining companies generating more than 40% of their revenues from thermal coal
>                                 (isPowerCo==1 & CoalSharePowerParent>0.4))) |                                           /// Power companies generating more than 40% of their electricity from coal                
>                                 (year > 2021 & ((isMiningCo==1 & CoalFracRevParent>0.15) | (isPowerCo==1 & CoalFracRevParent>0.15))) | /// Stop lending and underwriting to companies with >15% of activitiesrelated to thermal and lignite coal
>                                 (year > 2021 & (hasNoDecarbonStrat==1))))                                                       // Stop lending without a transition.
{txt}(124,740 missing values generated)

{com}. 
. **** NBS* -- Date taken from Yann Louvel reclaim finance
. gen ban_9374 = 1 if ((year >= 2019 & ((isPowerProj==1 & isNew==1) | ///Not provide financing to any new coal-fired power stations regardless of technology or jurisdiction
>                            (isMiningProj==1 & isNew==1 & isThermal==1 & CountryParent != "South Africa") | ///Not provide financing to thermal coal mines outside of South Africa
>                            (isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.4)))) //Thermal coal mining company relates to mining companies that derive more than 40% of their revenue from thermal coal mining
{txt}(167,616 missing values generated)

{com}.                                 
. *** Nippon Life* -- Adopted from Yanna Louvel
. gen ban_9480 = 1 if ((year > 2018 & (isNew==1 & isPowerProj==1))) // not to engage in new investment and financing in coal-fired power generation projects anywhere in Japan or overseas.
{txt}(202,176 missing values generated)

{com}. 
. *** Nordea*   ---- QUESTION
. gen ban_9527 = 1 if (((year > 2015 & (isNewCustomer==1 & (CoalFracRevParent == 1 | CoalSharePowerParent == 1))) | ///not to start new customer relationships with companies primarily dependent on coal
>                                 (year > 2020 &((isThermal==1 & isNewCustomer==1 & ((isMiningCo==1 & CoalFracRevParent > 0.5) | (isPowerCo==1 & CoalSharePowerParent > 0.5))) | ///not start any new banking relationships with companies that are pre-dominantly dependent on thermal coal, including coal-fred energy production and/or mining companies
>                                 (hasNoDecarbonStrat==1) | ///
>                                 ((isPowerCo==1 & CoalFracRevParent > 0.3) | (isMiningCo==1 & CoalFracRevParent > 0.3)))))) // does not invest in companies that have large and sustained exposure to thermal coal mining and more than 30%of their revenues derived from sales of coal products
{txt}(116,568 missing values generated)

{com}. 
. **** Norinchukin*
. gen ban_9543 =1 if(( year > 2019 & (isPowerProj==1 & isNew==1))) // NO financing for new power projects
{txt}(202,752 missing values generated)

{com}. 
. 
. **** OCBC*
. gen ban_9943 = 1 if ((year >= 2019 & (isPowerProj==1 & isNew==1))) // NO financing for new power projects
{txt}(202,176 missing values generated)

{com}. 
. ***PKO BP* 
. gen ban_10009 = 1 if ((year >= 2019 & (isMiningProj==1 & isNew==1))) // NO financing for new mining projects
{txt}(188,352 missing values generated)

{com}. 
. ***PNC* -- Date taken from Yann louvel 
. gen ban_10016 = 1 if ((year > 2017 & (isNewCustomer==1))) // How to do this---->more than a de minimis exposure to mountaintop removal mining?
{txt}(147,312 missing values generated)

{com}. 
. ***Rabobank* -- Date taken from yann louvel excel file
. gen ban_10773 = 1 if ((year >= 2017 & (isPowerCo==1 | isMiningCo==1)))
{txt}(104,256 missing values generated)

{com}. /*
> • directly finance the exploration, extraction or production of coal used for
> power generation, shale gas, tar sands and other nonconventional fossil
> natural resources, nor the transport up to the production unit, production,
> processing, or refining of these extractive industries products;
> • directly finance coal-fired power generation;
> • directly finance the trade of coal for power generation. We may directly
> finance the trade of higher grade metallurgical coals used for the
> production of steel and base metals only;
> • finance companies that realize more than 20% of their turnover in trading
> coal used for power generation.
> */
. 
. ***Raiffeisen*
. gen ban_10781 = 1 if ((year >= 2019 & ((isNew==1 & isThermal==1 & isMiningProj==1) | ///
>                                 (isNewCustomer==1 & isThermal==1 & isMiningCo==1)| ///
>                                 (isThermal==1 & isMiningCo==1)))) //customers in the thermal coal mining sector or companies where more than 50 percent of the revenue is generated from thermal coal trading.
{txt}(149,184 missing values generated)

{com}. 
. ***RBC*
. gen ban_10727 = 1 if ((year > 2020 & ((isNew==1 & isThermal==1 & isMiningProj==1) | ///
>                                 (isMountaintopProj==1) | /// new greenfield coal-fired power plant, thermal coal mine or Mountain Top Removal coal mining projects.
>                                 (isNewCustomer==1 & ((isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.6) | (isPowerCo==1 & CoalSharePowerParent> 0.6)) & hasNoDecarbonStrat==1))))                         //will not provide financing to new clients that operate significant thermal coal mining (>60% revenue) or coal power generation assets (>60% generation, Megawatt hour (MwH).
{txt}(171,648 missing values generated)

{com}.                          
.                                 
. ***Resona Holdings*
. gen ban_10909 = 1 if ((year >= 2019 & ((isProjFin==1 & isNew==1 & isThermal==1 & isPowerProj==1))))
{txt}(206,784 missing values generated)

{com}. 
. ***Rothschild & co*
. gen ban_9146 = 1 if ((year >= 2020 & ((isThermal==1) | ///
>                                 (isThermal==1 & isMiningProj==1 & isNew==1)| ///
>                                 (isNew==1 & isPowerProj==1)))) // not provide financing or financing advisory in relation to new thermal coal mining projects, new thermal coal developments or new coal-fired power generation assets
{txt}(133,056 missing values generated)

{com}. 
. 
. ***Samsung* -- From the Yann Louvel Excel file as link is empty
. gen ban_11256 = 1 if ((year > 2020 & isNew==1))
{txt}(177,408 missing values generated)

{com}. 
. ****Santander*
. gen ban_1527 = 1 if ((year >= 2020 & ((isNew==1 & isPowerProj==1)| ///New coal-fired Power Plants projects worldwide.
>                                 (isNewCustomer==1 & isPowerCo==1) | ///New clients with coal-fired power plants worldwide.
>                                 (isPowerProj==1 & isHighCarbonProj==1)))) //For existing clients: Transactions specific to coal power plants are allowed only when they improve significantly environmental impacts
{txt}(180,576 missing values generated)

{com}. 
. ****SEB* --- From Yann Louvel Excel File
. gen ban_11100 = 1 if ((year > 2015 & ((isNewCustomer==1 & isMiningCo==1 & CoalFracRevParent > 0.5) |  ////Exclusion of companies with major business in coal mining for new clients.
>                                 (isPowerProj==1)))) //Ending financing for coal power projects worldwide.
{txt}(163,728 missing values generated)

{com}. 
. ***Shinhan* -- Exact carbon emission listed, should we use isLowCarbonProj? -- Date from Yann Louvel excel file
. gen ban_11616 = 1 if ((year>2020 & isProjFin==1 & isHighCarbonProj==1 & CountryGroup == "OECD"))
{txt}(209,088 missing values generated)

{com}.  
. ****Shinsei Bank*
. gen ban_11628 = 1 if ((year >= 2020 & ((isThermal==1 & isPowerProj==1)))) //new investment and lending to coal-fired thermal power plants will not be provided either in Japan or overseas, in principle, based on a preventive approach
{txt}(190,080 missing values generated)

{com}. 
. ****Societe Generale*
. gen ban_11775 = 1 if (((year > 2015 & ((isProjFin==1 & isMiningProj==1 & (isExpansion ==1 | isNew ==1)) | /// No project financing of development of coal mines
>                            (isPowerProj==1 & isProjFin==1 & (isNew==1 | isExpansion==1)) | ///& CountryGroup == "High Income OECD") | ///no longer be involved in project financing of coal-fired power plants in high income OECD countries
>                            (isMountaintopComp==1)))  | /// does not offer financial products and services to clients who are involved in Mountain Top Removal 
>                            (year >= 2019 & ((isThermal==1 & ((isMiningCo==1 |isPowerCo ==1 & CoalFracRevParent > 0.5)) | /// No financing to the clients whose current activity in thermal coal* represents 50% or more
>                            (isThermal==1 & (((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent < 0.5 & CoalFracRevParent> 0.3)) & hasNoDecarbonStrat==1) | /// whose current activity in thermal coal represents between 30% and 50% and do not have a reduction strategy to reach at most 30% by 2025
>                            (isExpansion==1 & (isMiningCo==1 | isPowerCo==1))))) | /// who have plans to expand their thermal coal capacities
>                            (year >= 2020 & ((isThermal==1 & (isMiningCo==1 | isPowerCo==1)) | ///are Thermal Coal Developing Companies6 or -- 2020 date taken from yann louvel excel file
>                            (isThermal==1 & (((isMiningCo==1 & isPowerCo==1) & CoalFracRevParent > 0.25))))) | ///have more than 25% of their revenue linked to the Thermal coal sector7 or
>                            (year > 2021 & hasNoDecarbonStrat == 1))) // Does not have a transition plan.
{txt}(99,360 missing values generated)

{com}.                            
. //  Sparkassen- und Giroverband Hessen-Thüringen (Helaba)* 
. gen ban_8081  = 1 if ((year > 2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No financing for projects involving the construction of new coal-fired power plants or for expanding the capacity of existing coal-fired power plants
>                            (isNewCustomer==1 & (isMiningCo==1 | isPowerCo==1)) | /// No financing of new corporate clients whose business predominantly involves coal-based energy (coal mining or coal-fired power plants)
>                            (isMiningProj==1 & (isNew==1 | isExpansion==1)) | /// No financing of projects directly related to the mining of power plant coal, including process chains directly and exclusively associated
>                            (isMountaintopProj==1) | ///No financing of projects in connection with mountaintop removal mining
>                            (isPowerCo==1 & CoalFracRevParent>0.25))))
{txt}(134,928 missing values generated)

{com}.                 
. 
. ***Standard Bank*
. gen ban_12090 = 1 if ((year >= 2019 & (isNew==1 & isPowerProj==1 & isHighCarbonProj == 1 ))) //& CountryGroup != "IDA"))) /// IDA - Overseen by 173 shareholder nations, IDA aims to reduce poverty by providing loans (called "credits") and grants for programs that boost economic growth, reduce inequalities, and improve people's living conditions. IDA lends money on concessional terms.
{txt}(205,632 missing values generated)

{com}. 
. ***Standard Chartered* 
. gen ban_12093 = 1 if (((year > 2018 & ((isNew==1 & isMiningProj==1 & isThermal==1)| /// New standalone non-captive thermal coal mining projects -- Date taken from Yann louvel
>                            ((isNew==1 | isExpansion==1) & isPowerProj==1 & isHighCarbonProj==1) | ///New coal-fired power plant projects in any location; Any coal-fired power plant expansions, retrofits or dedicated infrastructure, in any location
>                            (isMountaintopProj==1)))|  /// Mining operations that conduct Appalachian Mountaintop Removal
>                            (year >= 2021 & (isThermal==1 & (((isMiningCo==1 |isPowerCo==1) & CoalFracRevParent == 1.00)))) | ///By January 2021, we will have no group level clients who are 100% dependent on earnings from thermal coal
>                            (year >= 2025 & (isThermal==1 & (((isMiningCo==1 |isPowerCo==1) & CoalFracRevParent > 0.60)))) | ///By January 2025, we will extend this threshold to group level clients who are greater than 60% dependent on earnings from thermal coal
>                            (year >= 2027 & (isThermal==1 & (((isMiningCo==1 |isPowerCo==1) & CoalFracRevParent> 0.40)))) | ///greater than 40% dependent on earnings from thermal coal
>                            (year >= 2030 & (isThermal==1 & (((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent > 0.10)))))) // By January 2030, we will extend this threshold to group level clients who are greater than 10% dependent on earnings from thermal coal
{txt}(147,360 missing values generated)

{com}.                            
. 
. ****Sumitomo Mitsui Financial Group* -- Date taken from Yann louvel
. gen ban_12295 = 1 if ((year >2020 & (((isNew==1 | isExpansion==1) & isPowerProj==1)| ///
>                            (isMountaintopProj==1)))) // Support for newly planned coal-fired power plants and the expansion of existing plants are not provided
{txt}(171,648 missing values generated)

{com}. 
. ****Sumitomo Mitsui Trust Holdings* -- Date taken from Yann louvel
. gen ban_12296 = 1 if ((year >= 2019 & (isNew==1 & isPowerProj==1) & isProjFin == 1)) // SuMi TRUST Bank has decided, in principle, not to engage in new projects for the construction of coal-fired power plants
{txt}(206,784 missing values generated)

{com}. 
. ***Swedbank*
. gen ban_12367 = 1 if ((year > 2018 & ((((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent>0.05))|  /// We will not provide financial services to companies mining and producing coal to more than 5% of its revenue
>                             (isNew==1 & isPowerProj==1)))) // We will not directly finance coal-fired power production or the establishment of new coal-fired power plants
{txt}(160,128 missing values generated)

{com}.                                  
. *****TD* (unkonwn year WaybackMachine suggests 2017, Page source code says 2020)
. gen ban_12752 = 1 if year > 2020 & (isMountaintopProj==1 & isMiningProj==1)
{txt}(183,168 missing values generated)

{com}. 
. ***Toho*
. gen ban_12684 = 1 if ((year >= 2020 & (isNew==1 & isPowerProj==1)))
{txt}(202,752 missing values generated)

{com}. 
. ****UBS*
. gen ban_12925 = 1 if ((year > 2020 & ((isNew==1 & isPowerProj==1)| ///Not providing project-level finance to new coal-fired power plants globally
>                        (isPowerCo==1 & CoalSharePowerParent>0.3 & hasNoDecarbonStrat==1 & isHighCarbonProj==1) | ///Only supporting financing to transactions of existing coal-fired operators (>30% coal reliance)who have a transition strategy in place, or if the transaction is related to renewable energy
>                            (isMiningProj==1 & isThermal==1 & (isNew==1 | isExpansion==1))| ///Not providing financing where the stated use of proceeds is for greenfield1 thermal coal mines
>                            (isMountaintopComp==1)))) //Not providing financing to coal-mining companies engaged in MTR operations
{txt}(156,528 missing values generated)

{com}. 
. ***Unicredit* 
. gen ban_9042 = 1 if ((year > 2020 & ((isProjFin==1) | ///
>                            (isExpansion == 1) | /// No Project finance or Expansion finances
>                            ((isMiningCo == 1|isPowerCo== 1) & CoalFracRevParent > 0.25 & hasNoDecarbonStrat == 1)))) // No financing for companies above 25% of revenue from coal unless they have a plan to exit by 2030
{txt}(147,968 missing values generated)

{com}. 
. ****United Overseas Bank (UOB)* 
. gen ban_13101 = 1 if ((year >= 2019 & ((isNew==1 & isPowerProj==1) | ///
>                            (isProjFin==1 & isMiningProj==1 & isNew==1 & isThermal==1)) )) //Discontinued new financing of coal-fired power plant projects and prohibited the project financing of greenfield thermal coal mines
{txt}(197,568 missing values generated)

{com}. 
. ****US Bancorp*
. gen ban_12946 = 1 if ((year > 2021 & ((isMountaintopProj==1) | /// No participation in Mountaintop projects
>                            (isProjFin==1 & isNew==1 & isMiningProj==1) | /// we will not participate in any relationship involving or provide project financing or other forms of asset-specific financing for the development of new coal mines.
>                            (isPowerProj==1 & isProjFin==1 & (isNew==1 | isExpansion==1))))) //direct project financing of coal-fired power plants and relationships that involve constructing such plants.
{txt}(179,712 missing values generated)

{com}.                            
. ***Wells Fargo*-- Date from Yann Louvel Excel file 
. gen ban_13490 = 1 if( (year > 2015 & (isMountaintopProj==1)))
{txt}(170,208 missing values generated)

{com}. 
. 
. ****Westpac -- Link not found* -- Date from Yann Louvel Excel file 
. gen ban_13563 =1 if ((year >= 2017 & ((isThermal==1 & isNew == 1 & isMiningProj==1) | (isPowerProj==1))))
{txt}(168,768 missing values generated)

{com}. /*
> •     Ending direct finance for new thermal coal mines projects in new coal producing basins or where the calorific value is not in the top 15% globally.
> •     Exclusion of coal mining companies that have a calorific value which  &does not rank in the top quartile globally.
> •     Ending direct finance for new coal power generation where it does not reduce the emissions intensity of the grid in which the generator operates.
> 
> ***Zurcher Kantonalbank 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
{res}{txt}{res}{txt}{res}{txt}(note: j = 50 967 981 1043 1106 1124 1261 1317 1527 1869 2263 2311 2351 2683 2726 2737 2869 3388 3536 3731 3966 4100 4107 4128 4176 4229 4293 4309 4462 5853 6179 6184 6253 6757 7072 7434 7439 8081 8286 8917 8939 9031 9042 9146 9227 9374 9432 9480 9527 9543 9943 10009 10016 10727 10773 10781 10909 11026 11100 11256 11616 11628 11775 12090 12093 12295 12296 12367 12684 12752 12925 12946 13101 13490 13563 13818 15000)
{res}(note: cannot preserve labels when reshaping long)
{txt}{res}{txt}
Data{col 36}wide{col 43}->{col 48}long
{hline 77}
Number of obs.{col 19}{res}                   22{txt}{col 43}->   {res}1,694                
{txt}Number of variables{col 19}{res}                   78{txt}{col 43}->   {res}3                    
{txt}j (77 values)         {col 43}->{col 48}{res}BankID
{txt}xij variables:
           {res}ban_50 ban_967 ... ban_15000{col 43}{txt}->{res}{col 48}ban_
{txt}{hline 77}
{res}{txt}
{com}. sum ban_intensity

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_intens~y {c |}{res}      1,694    .0331684    .0405982          0   .1345825
{txt}
{com}. replace ban_intensity = ban_intensity/r(max)
{txt}(916 real changes made)

{com}. keep BankID year ban_intensity 
{txt}
{com}. compress
  {txt}variable {bf}{res}BankID{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
{txt}  (6,776 bytes saved)

{com}. save ../Intermediate/policy_intensity_yearly, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/policy_intensity_yearly.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/policy_intensity_yearly.dta{rm}
saved
{p_end}

{com}. 
. 
. ***********************************************************************
. ** RUN CODE TO GENERATE STRENGTH MEASURE BASED ON 16 SCENARIOS 
. ***********************************************************************
. include "../Data_Cleaning/Build_Policy_Strength_Alternative_Measurement.do"
{txt}
{com}. // build ban strength with two new measures
. 
. // FIRST NEW MEASURE: calculate ban intensity only for meaningful scenarios
. ********************************************************************************
. * SETUP SCENARIOS
. ********************************************************************************
. clear
{txt}
{com}. tempfile time
{txt}
{com}. clear 
{txt}
{com}. set obs 22
{txt}{p}
Number of observations ({bf:_N}) was 0,
now 22.
{p_end}

{com}. gen year = 2008+_n
{txt}
{com}. save `time'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000c{rm}
saved
as .dta format
{p_end}

{com}.         
. 
. * Inputting different scenarios
. clear
{txt}
{com}. * We have 74 banks, when everything is turned on
. ** NOTE made changes for isThermal
. //                                                                                                                                                              1                                               2                               3                  4             5                      6                               7                       8                9         10         11     12               13                    14                  15                      
. input scenario isProjFin isCorpFin str50 ContinentParent str50 CountryParent CoalFracRevParent CoalSharePowerParent isMiningCo isPowerCo isMiningProj isPowerProj isNewCustomer isLignite isThermal isExpansion isNew isLowCarbonProj isMountaintopProj isMountaintopComp hasDecarbonStrat  str50 CountryGroup

     {txt} scenario  isProjFin  isCorpFin                                     ContinentParent                                       CountryParent  CoalFra~t  CoalSha~t  isMinin~o  isPowerCo  isMinin~j  isPower~j  isNewCu~r  isLignite  isThermal  isExpan~n      isNew  isLowCa~j  isMount~j  isMount~p  hasDeca~t                                        CountryGroup
  1{com}. //                                                                                    X X    <-- minin project and power project
. 
. //Atrribute Number (see ABOVE)  1   2   3 4 5 6 7 8 9 10 11 12 13 14 15
. 1 1 0 "North America"  "USA"    1   1   0 1 0 1 1 0 1 0  1  0  0  0  0  "OECD" // Power Project, isNew, isNewCustomer, Project finance
{txt}  2{com}. 2 1 0 "North America"  "USA"    1   1   0 1 0 1 0 0 1 0  1  0  0  0  0  "OECD" // Power Project, isNew, isOldCustomer, Project finance
{txt}  3{com}. 3 1 0 "North America"  "USA"    1   1   0 1 0 1 1 0 1 1  0  0  0  0  0  "OECD" // Power Project, isExpansion, isNewCustomer, Project finance
{txt}  4{com}. 4 1 0 "North America"  "USA"    1   1   0 1 0 1 0 0 1 1  0  0  0  0  0  "OECD" // Power Project, isExpansion, isOldCustomer, Project finance
{txt}  5{com}. 5 0 1 "North America"  "USA"    1   1   0 1 0 1 1 0 1 0  0  0  0  0  0  "OECD" // Power Project, isNewCustomer, Corp finance
{txt}  6{com}. 6 0 1 "North America"  "USA"    0.2 0.2 0 1 0 1 1 0 1 0  0  0  0  0  0  "OECD" // Power Project, isNewCustomer, Corp finance, revenue=0.2
{txt}  7{com}. 7 0 1 "North America"  "USA"    0.2 0.2 0 1 0 1 0 0 1 0  0  0  0  0  0  "OECD" // Power Project, isOldCustomer, Corp finance, revenue=0.2
{txt}  8{com}. 8 1 0 "North America"  "USA"    1   1   1 0 1 0 1 0 1 0  1  0  0  0  0  "OECD" // Mining Project, isNew, isNewCustomer, Project finance
{txt}  9{com}. 9 1 0 "North America"  "USA"    1   1   1 0 1 0 1 0 0 1  0  1  0  0  0   "OECD" // Mining Project, isNew, isOldCustomer, Project finance
{txt} 10{com}. 10 1 0 "North America" "USA"    1   1   1 0 1 0 1 0 1 1  0  0  0  0  0  "OECD" // Mining Project, isExpansion, isNewCustomer, Project finance
{txt} 11{com}. 11 1 0 "North America" "USA"    1   1   1 0 1 0 0 0 1 1  0  0  0  0  0  "OECD" // Mining Project, isExpansion, isOldCustomer, Project finance
{txt} 12{com}. 12 0 1 "North America" "USA"    1   1   1 0 1 0 1 0 1 0  0  0  0  0  0  "OECD" // Mining Project, isNewCustomer, Corp finance
{txt} 13{com}. 13 0 1 "North America" "USA"    0.2 0.2 1 0 1 0 1 0 1 0  0  0  0  0  0  "OECD" // Mining Project, isNewCustomer, Corp finance, revenue=0.2
{txt} 14{com}. 14 0 1 "North America" "USA"    0.2 0.2 1 0 1 0 0 0 1 0  0  0  0  0  0  "OECD" // Mining Project, isOldCustomer, Corp finance, revenue=0.2
{txt} 15{com}. 
. //extra secenarios              1   2   3 4 5 6 7 8 9 10 11 12 13 14 15
. 101 1 0 "North America" "USA"   0   0   0 1 0 1 0 0 1 0  1  0  0  0  0    "OECD" // Power Project Finance, New
{txt} 16{com}. 102 1 0 "North America" "USA"   0   0   0 1 0 1 0 0 1 1  0  0  0  0  0    "OECD" // Power Project Finance, Expansion
{txt} 17{com}. 103 0 1 "North America" "USA"   0   0   0 1 0 1 0 0 1 0  0  0  0  0  0    "OECD" // Power Company Corporate Finance (also screen on isPowerProj)
{txt} 18{com}. 104 1 0 "North America" "USA"   0   0   1 0 1 0 0 0 0 0  1  0  0  0  0    "OECD" // Mining Project Finance, New
{txt} 19{com}. 105 1 0 "North America" "USA"   0   0   1 0 1 0 0 0 0 1  0  0  0  0  0    "OECD" // Mining Project Finance, Expansion
{txt} 20{com}. 106 0 1 "North America" "USA"   0   0   1 0 1 0 0 0 0 0  0  0  0  0  0    "OECD" // Mining Company Corporate Finance (also screen on isMiningProj)
{txt} 21{com}. 
. 
. end
{txt}
{com}. cross using `time'
{txt}
{com}. 
. gen isHighCarbonProj = 1-isLowCarbonProj
{txt}
{com}. gen hasNoDecarbonStrat  = 1-hasDecarbonStrat
{txt}
{com}. 
. //drop impossible scenarios. None of these are generated above anyway, so below doesn't do anything.
. drop if isMiningCo == 0 & isMountaintopComp == 1
{txt}(0 observations deleted)

{com}. drop if isMiningProj == 0 & isMountaintopProj == 1
{txt}(0 observations deleted)

{com}. drop if isMiningProj == 1 & isPowerProj == 1
{txt}(0 observations deleted)

{com}. drop if isNew == 1 & isExpansion == 1
{txt}(0 observations deleted)

{com}. drop if isCorpFin == 1 & isProjFin == 1
{txt}(0 observations deleted)

{com}. drop if isPowerProj == 1 & isThermal == 0
{txt}(0 observations deleted)

{com}. drop if isPowerCo == 1 & isThermal == 0
{txt}(0 observations deleted)

{com}. 
. save "../Intermediate/policy_coding_setup_blank", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/policy_coding_setup_blank.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/policy_coding_setup_blank.dta{rm}
saved
{p_end}

{com}. 
. 
. ********************************************************************************
. * STANDARD POLICY CODING
. ********************************************************************************
. use "../Intermediate/policy_coding_setup_blank", clear
{txt}
{com}. include "../Data_Cleaning/Policy_Coding_Function.do"
{txt}
{com}. /*
> //DG's starting template for Coal Divestment policy coding.
> 
> Variables we will use to start in the policy definitions:
> (numbers in paranthesis indicates number of banks using this criteria)
> 
>         isProjFin:                                      = 1 for project finance
>         isCorpFin:                                      = 1 for corporate finance (3)
>         ContinentParent:                        {c -(}Africa, Asia, Europe, North America, South America, Australia{c )-} 
>         CountryParent:                          {c -(}any country name{c )-} Update: 9/15/2021 
>         
>         CoalFracRevParent:                      = fraction of revenue from coal of parent company
>         CoalSharePowerParent:           = coal share of power production of parent company
> 
>         isMiningCo:                                     = is company a mining company
>         isPowerCo:                                      = is company a power company
>         isMiningProj:                           = is project a mining project
>         isPowerProj:                            = is project a power project
> 
>         isNewCustomer                           = is the borrower a new customer?
> 
>         isLignite:                                      = is the project using lignite coal?
>         isThermal:                                      = is the project using thermal coal?
> 
>         isExpansion:                            = are proceeds used for expansion of capacity/life of coal assets?
>         isNew:                                          = are proceeds used for new coal ASSETS?
>         isLowCarbonProj:                        = are proceeds used for carbon transition / low carbon project
>         isMountaintopProj:                      = are proceeds used for mountaintop mining?
>         isMountaintopComp:                      = is company doing mountaintop mining? (6)
> 
>         hasDecarbonStrat:                       = Company has plan to decarbonize/diversify from carbon
>         
>         year:                                           = when is the financing happening
>         
>         CountryGroup                            = Option for group of countries in some
>                                                                   policies eg: OECD             
> */
. 
. * POLICY 1: XX BANK, YY YEAR
. *                       local path to pdf of policy document
. // use "temp", clear 
. // gen CountryGroup = " "
. //
. 
. 
. ***ABN AMRO
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ABN_AMRO_Exclusion_list.pdf
. gen ban_15000 = 1 if (year >= 2016 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1)) | isMountaintopProj==1)) 
{txt}(365 missing values generated)

{com}. 
. ** ABSA*
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ABSA_coal-financing-standard.pdf
. gen ban_50 = 1 if (year >= 2020 & isNew == 1 & isPowerProj == 1) 
{txt}(407 missing values generated)

{com}. *carveouts if no reasonable cost alternative exists or if project is compliant with Equator Principles (EP)
. 
. ** ANZ*
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ANZ_2020.pdf 
. gen ban_967 = 1 if ((year >= 2030 & isHighCarbonProj==1) | /// after 2030, all direct finance only for low carbon projects 
>                                         (year >= 2020 & ((isNewCustomer==1 & CoalFracRevParent > 0.1) |                 /// after 2020, no new customers with material thermal coal exposures
>                                         (isNew==1 | isExpansion==1))) | ///  after 2020, no direct financing of new or expansion coal power or mining 
>                                         (year >= 2018 & ((isMiningProj==1 & isNew==1) |         ///no financing for new conventional coal-fired power stations
>                                         (CoalFracRevParent > 0.5))))
{txt}(238 missing values generated)

{com}.                            
. ***** Bank of America*
. gen ban_1869 = 1 if (((year >= 2021 & ((isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj==1) | /// Ban construction or expansion of new coal fired powerplants - unless they have a low carbon project.
>                                 (isMiningProj==1 & (isNew==1 | isExpansion==1)) |                                                               /// Ban new coal mines or expansion of existing coal mines
>                                 (isMountaintopComp==1))) | ///
>                                 (year >= 2025 & (isThermal==1 & isMiningCo==1 & CoalFracRevParent>0.25 & hasNoDecarbonStrat==1)))) // Starting 2025 will ban clients having more than 25% of revenue from thermal mining that do not have decarbonization strategy
{txt}(314 missing values generated)

{com}.         
. **** Barclays*
. gen ban_2263 = 1 if (((year >= 2019 & (isProjFin==1 & isPowerProj==1 & (isNew==1 | isExpansion==1) | /// No project finance to enable the construction or material expansion of coal-fired power stations anywhere in the world  
>                                 (isProjFin==1 & isMiningProj==1 & isThermal==1 & (isNew==1 | isExpansion==1)) | ///No project finance for the development of thermal coal mines anywhere in the world.
>                                 (isMountaintopProj==1))) | ///
>                                 (year>= 2020 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.5))) | ///From 2020 no financing to clients that generate more than 50% of revenue from thermal coal activities
>                                 (year >= 2025 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.3))) | /// 2025, no longer provide any financing to clients that generate more than 30% of revenue from thermal coal activities
>                                 (year >= 2030 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.1))))) //From 2020 no financing to clients that generate more than 10% of revenue from thermal coal activities
{txt}(306 missing values generated)

{com}. 
. 
. 
. **** BAYERN LB*
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Bayern_LB_sustainability_policy_2018.pdf
. gen ban_2311 = 1 if (year >= 2018 & (isMountaintopProj==1 )) //| isLignite==1))) 
{txt}(440 missing values generated)

{com}. * emphasis on banning lignite mining + power plants
. 
. 
. **** BBVA*
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\BBVA_Responsible_banking_2019.pdf
. gen ban_1043 = 1 if ((year >= 2019 & ((isNew==1 & (isMiningProj ==1 | isPowerProj==1 | isMountaintopProj==1)) |         /// No new Coal mines, New coal powerplants, New Montaintop removal projects.
>                                 (isExpansion==1 & (isMiningProj==1 | isPowerProj==1)) |                                         /// No mine , powerplant expansions.
>                                 (isMiningCo==1 & CoalFracRevParent >0.35 & hasNoDecarbonStrat==1) |                     /// Excluding clients with >35% revenue from mining without diversifivation strategy
>                                 (isPowerCo==1 & CoalFracRevParent>0.35 & hasNoDecarbonStrat==1))) | /// Excluding clients with >35% revenue from coal power without diversifivation strategy
>                                 (year >= 2018 & ((isNew==1 & (isPowerProj==1 | isMiningProj==1)) | /// would not finance any new coal mines and coal-fired power stations or extensions to existing ones
>                                 ((isMiningCo==1 | isPowerCo==1) & CoalSharePowerParent>= 0.4)))) // would exclude companies relying on coal for more than 40 per cent of their mining or power generation activity.     
{txt}(260 missing values generated)

{com}. 
. **** Bendingo and Adelaide bank*
. gen ban_2351 = 1 if ((year >= 2014 & (isMiningCo==1 | isPowerCo==1))) // Do not lend to projects in the coal sector
{txt}(100 missing values generated)

{com}. 
. 
. **** BNP Paribas *
. gen ban_1106 =1 if ((year > 2020 & (((isNew==1 | isExpansion==1) & isPowerProj==1) | /// No finance for new or expansion of power projects
>                           (isNewCustomer==1 & CoalFracRevParent> 0.25 & hasNoDecarbonStrat==1))) | /// No finance for new customers with more than 25% of revenue from mining and has no Diversification strat
>                           (year >=2017 & ((isNew==1 & isPowerProj==1) | ///
>                           (isPowerCo==1 & isExpansion == 1)))) 
{txt}(306 missing values generated)

{com}.                         
. ***** BPCE*
. gen ban_1124 = 1 if (((year> 2015 & (isThermal==1 & isProjFin==1)) | ///
>                            (year > 2019 & (isThermal==1 & ((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent >0.25))))) | ///
>                            (year>=2020 & (isNew==1 &(isPowerCo==1 | isMiningCo==1))) // Natixis will halt its relationships with clients that develop new capacity in coal-powered electricity generation or thermal coal mining. (PROBLEM)
{txt}(272 missing values generated)

{com}. 
. ***** Caixabank* Talk about credit risk
. gen ban_2869 = 1 if ((year >= 2019 & ((isMiningProj==1 & (isNew==1 | isExpansion==1)) | ///No credit risk in new or expansion of mining projects 
>                            (isMountaintopProj==1) |                                                                     /// No credit risk for Montaintop Removal Projects
>                            (isMiningCo==1 & CoalFracRevParent > 0.4 & hasNoDecarbonStrat==1) | ///no credit risk in new long-term transactions or arrangements requested by mining companies with over 40% revenue from coal mining and no diversification strategy.  
>                            (isPowerProj==1 & (isExpansion==1 | isNew==1)) |                ///No credit risk in new or expansion of power projects  
>                            (isPowerCo==1 & CoalFracRevParent> 0.4 & hasNoDecarbonStrat==1)))) //no credit risk in new long-term transactions or arrangements requested by coal-power companies with over 40% revenue from coal mining and no diversification strategy.
{txt}(272 missing values generated)

{com}. 
. ** CATHAY FINANCIAL ????
. 
. **** Chiba bank* - 
. gen ban_3388 = 1 if (year >= 2020 & (isNew==1 & isPowerProj==1)) // if the support of the Government of Japan, international development organizations, etc. can be confirmed then will consider financing. 
{txt}(407 missing values generated)

{com}. 
. 
. **** CIMB* 
. gen ban_2737 = 1 if ((year > 2020 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1) & hasNoDecarbonStrat==1) | /// No financing for new mining or powerprojects that do not have a decarbon strategy 
>                                 (isExpansion==1 & (isMiningProj==1 | isPowerProj==1))))) // No financing for expansion of mining or powerprojects that do not have a decarbon strategy 
{txt}(320 missing values generated)

{com}. 
. 
. ** Citi*
. gen ban_3536 = 1 if ((year >= 2021 & (( isThermal==1 & isProjFin==1 & (isNew==1|isExpansion==1) & isMiningProj==1) | /// New thermal coal mines or significant expansion of existing mines;
>                                          (isProjFin==1 & (isNew==1|isExpansion==1) & isPowerProj==1) | ///New coal-fired power plants or expansion of existing plants
>                                          (isMiningCo==1 & isThermal==1 & CoalFracRevParent >= 0.25) | ///targets to phase out our financing of mining companies deriving ≥25% of their revenue from thermal coal mining
>                                          (isPowerCo==1 & isHighCarbonProj == 1) | ///
>                                          (isNewCustomer==1 & (CoalSharePowerParent >= .2 & isHighCarbonProj==1) | ///Not onboard any new clients with ≥20%,
>                                          (isNewCustomer==1 & isExpansion==1)))) | /// Not onboard any new clients that have plans to expand coal-fired power generation
>                                          (year > 2025  & ((isPowerCo & CoalFracRevParent >= 0.05 & isNewCustomer == 1) | ///
>                                          (isMiningCo & isCorpFin))) | ///
>                                          (year > 2030 & ((isPowerCo & CoalFracRevParent>= 0.05 & CountryGroup == "OECD") | ///
>                                          (isMiningCo))) | ///
>                                          (year >=2015 & isMiningCo==1 & CoalFracRevParent >= 0.5))
{txt}(240 missing values generated)

{com}.                                         
. 
. 
. ***** Commerzbank*
. gen ban_3731 = 1 if (((year >= 2020 & ((isNew ==1 & (isMiningProj==1 | isPowerProj==1)) | ///No financing for new mining projects
>                                 (isMountaintopComp==1))) | ///No Financing for mountaintop companies
>                                 (year>2021 & ((isPowerCo==1 & CoalSharePowerParent > 0.30 & CountryParent == "Germany") | ///German clients from the energy supply sector to limit the share of electricity generated from coal (based on their production performance) to below 30 per cent bythe end of 2021
>                                 (isPowerCo==1 & CoalSharePowerParent>0.5))) | /// For ROW 
>                                 (year > 2016 & ((isNewCustomer==1 & isPowerCo==1 & CoalSharePowerParent> 0.3 & CountryParent == "Germany") | /// For new clients, the above is enacted since 2016
>                                 (isNewCustomer==1 & isPowerCo==1 & CoalSharePowerParent>0.5)))))
{txt}(345 missing values generated)

{com}.                 
. 
. *** CommonwealthBank
. * No defined criteria for exclusions
. 
. 
. **** Concordia- Unknown year and Synthetic_Bank_ID
. // gen ban = 1 if (isNew==1 & isPowerProj==1 & isHighCarbonProj==1) 
. 
. 
. **** CPEG, documents in french. No loans in our datasets
. 
. **** Credit Agricole*
. gen ban_981 =1 if  ( ///
>                                         (year >= 2020 & ((isNewCustomer==1 & isMiningCo==1 & isThermal==1 & CoalFracRevParent> 0.25==1 & hasNoDecarbonStrat==1) | /// Will not develop relations with companies that generate more than 25% of their turnover in the thermal coal industry and have not adopted a transition strategy  
>                                                                          (isNewCustomer==1 & isThermal==1 & isPowerCo==1 & (isNew==1 | isExpansion==1)) |  /// the Bank will not enter into relationships with companies developing or planning to develop new thermal coal capacities 
>                                                                          (isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No finance for new or exapnding power plants
>                                                                  (isThermal==1 & (isMiningCo==1 & CoalFracRevParent >0.25) & hasNoDecarbonStrat==1) | ///issuers generating more than 25% of their turnover from thermal coal extraction are divested
>                                                                          (  (  (isMiningCo==1 & CoalFracRevParent >0.5) | (isPowerCo==1 & CoalFracRevParent>0.5)) & hasNoDecarbonStrat==1)) ///
>                                         ) ///
>                                         | ///issuers generating more than 50% of their turnover from coal sector are divested 
>                                         (year >= 2019 & ((isNewCustomer==1 & CoalFracRevParent>0.25) | ///Credit Agricole will also exclude new clients with more than 25% activity in the coal sector, and will only support existing clients above this threshold with dedicated project financing to non-coal projects
>                                                                          (isExpansion==1)) ///
>                                         ) ///
>                                         | ///Credit Agricole also ends all supports to companies expanding or planning to expand their activities in the coal sector, from coal extraction to coal power production
>                                         (year > 2016 & ((isNew==1 | isExpansion==1) & isPowerProj==1) ///
>                                         ) ///
>                                    ) ///
> 
{txt}(272 missing values generated)

{com}. */
. 
. **** Credit Mutuel*
. *PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Credit_Mutuel_2020.pdf
. gen ban_2726 = 1 if (year >=2020 & ((isExpansion==1 & (isMiningProj==1 | isPowerProj==1)) | /// Banning any company expanding activities in the coal sector
>                            ((isMiningCo==1|isPowerCo==1) & CoalFracRevParent>0.20) |                                            /// Banning company with coal revenue >20% 
>                            ((isPowerCo==1|isMiningCo==1) & CoalSharePowerParent > 0.20) |                                       /// Banning company with coal's energy mix > 20%
>                            (hasNoDecarbonStrat==1))) |                                                                          /// Continue financing for clients that do have a Diversification Strategy 
>                                 (year >= 2019 & ((isNew==1 & isPowerProj==1) | ///Crédit Mutuel Alliance Fédérale states that it intends to refrain from participating in operations related to the building of new coal-fired power plant
>                                 (CoalFracRevParent >= 0.5 & (isMiningCo==1 | isPowerCo==1)) | ///refrain from entering into relations with companies whose main activity consists in coal mining or is over 50% related to coal sector activities
>                                 (isHighCarbonProj == 1)))       
{txt}(200 missing values generated)

{com}.                                 
. ***** Credit_Suisse*
. gen ban_3966 = 1 if (((year > 2016 & (isMountaintopProj==1)) | /// No finances for Mountaintop Projects 
>                                 (year>2017 & ((isThermal==1 & isNew==1 & isMiningProj==1) | /// No financing for new thermal mines
>                                 (isPowerProj==1 & isNew==1 & isHighCarbonProj==1))) | /// No financing for new coal power plants unless low carbon technology used
>                                 (year >= 2020 & ((isMiningCo==1 & CoalFracRevParent>0.25 & isThermal==1 & hasNoDecarbonStrat==1) | /// No financing for thermal mining companies having more than 25% of revenue from coal and does not have a diversification strat -- date from yann louvel excel file
>                                 (isPowerCo==1 & CoalFracRevParent>0.25 & hasNoDecarbonStrat==1 ))))) // No financing for Coal Power plant companies having more than 25% of revenue from coal and does not have a diversification strat.
{txt}(322 missing values generated)

{com}. 
. *** Dai_ichi Life *
. gen ban_4128 = 1 if ((year > 2019 & (isPowerProj==1))) // general excercise to refrain from lending financial support to coal power projects
{txt}(330 missing values generated)

{com}. 
. 
. **** Danske Bank*
. gen ban_4176 = 1 if ((year >2021 & ((isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.05) |  /// No financing for thermal coal mines with revenue > 0.05
>                            (isPowerCo==1 & CoalFracRevParent> 0.05)))) //No financing for coal power companies with revenue > 0.05
{txt}(323 missing values generated)

{com}.                 
. **** DBS*
. gen ban_4309 =1 if ((year > 2020 & ((isNew==1 & isPowerProj==1) | /// No financing on new coal-fired power plants
>                           (hasNoDecarbonStrat==1) | /// Only support customers with a diversification strategy
>                           (isNew==1 & isProjFin==1 & isThermal==1 & isMiningProj==1) | /// Stopping project financing of greenfield thermal coal mines
>                           (isThermal==1 & isMiningCo==1 & CoalFracRevParent == 1.00)))) // Stopping financing of pure play thermal coal mining, processing, trading, construction and operation of thermal coal power plants 
{txt}(240 missing values generated)

{com}. 
. **** Deka* 
. gen ban_4229 = 1 if ((year > 2019 & ((isNew==1 | isExpansion==1) & isPowerProj==1))) // Development, construction and operation of coal-fired power plants
{txt}(374 missing values generated)

{com}. 
. **** Desjardins*
. gen ban_2683 = 1 if ((year > 2020 & ((isMiningCo==1) | /// Operate or develop coal mines
>                            (isPowerCo ==1 & CoalSharePowerParent>0.1) | /// Have greater than 10%, or 5 GW, installed coal power generation capacity
>                            ((isNew==1 | isExpansion==1) & isPowerCo==1)))) // Are building, extending or renovating coal mines, power plants or infrastructure.
{txt}(250 missing values generated)

{com}.                            
. **** Deutsche Bank*
. gen ban_4293 = 1 if (((year > 2016 & (isPowerProj==1 & (isNew==1 | isExpansion==1))) | ///
>                            (year > 2020 & ((isMountaintopProj==1 & CountryParent == "USA") | /// No financing for MTR projects in the USA
>                            (isPowerCo==1 & CoalFracRevParent > 0.5 & hasNoDecarbonStrat==1 & ContinentParent != "Asia") | /// Not provide finances for companies with more than 50% revenue and not have decarbonization strategy. 2020 for all continents except for Asia.
>                            (isMiningProj==1 & isThermal==1 & isNew==1)))  | ///not provide any financing for greenfield thermal coal mining
>                            (year>=2022 & isPowerCo==1 & CoalFracRevParent > 0.5 & hasNoDecarbonStrat==1 & ContinentParent == "Asia"))) // 2022 for asia
{txt}(336 missing values generated)

{com}. 
. **** DNB*
. gen ban_4100 = 1 if ((year > 2016 & ((isProjFin==1 & isPowerProj==1) | /// No project Finance for coal fired power plant
>                                 (isNew==1 & isPowerCo==1 & CoalFracRevParent > 0.3)))) // New customers with more than 30% share of rev from coal fired power plants
{txt}(356 missing values generated)

{com}.                                                                                         
. ***** DZ Bank*
. gen ban_4107 = 1 if (((year > 2017 & (isProjFin==1 & isPowerProj==1)) | ///
>                            (year > 2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No financing of new or existing coal-fired power plants
>                            (isMiningCo==1 & isThermal==1) |  ///No financing of activities upstream in the value chain for thermal coal, especially mining, trade and directly related activities
>                            (hasNoDecarbonStrat==1))))) // No indirect financing of companies with an increased share of coal if no will to transform is evident or if the use of funds for coal can be ruled out
{txt}(222 missing values generated)

{com}.                            
. **** E.Sun*
. gen ban_4462 = 1 if ((year > 2019 & (isPowerProj==1 & (isNew==1 | isExpansion==1))))
{txt}(374 missing values generated)

{com}. 
. 
. **** Erste Group*
. gen ban_1261 = 1 if (((year >= 2021 & ((isMiningProj==1 |isPowerProj==1) & (isNew==1 | isExpansion==1) | ///Direct financing of coal-asset specific investments or cash flows related to coal mining, coal processing, coke processing or coal based power generation
>                         (isCorpFin==1 & isExpansion==1 & (isMiningCo==1 | isPowerCo==1)) | /// Corporate financing for companies or group of companies which extend their coal mining or coalbased power generation (installed) capacities
>                         (isCorpFin==1 & ((isMiningCo==1 & CoalFracRevParent>0.25 ) | (isPowerCo==1 & CoalFracRevParent>0.25))))) |  ///Corporate financing for companies or group of companies which have more than 25% of revenues coming from coal sector
>                         (year > 2023 & hasNoDecarbonStrat==1 & isCorpFin==1))) //Corporate financing for companies or group of companies which do not set up until end of 2023 a transition plan aligned with the 2030 phase out target
{txt}(258 missing values generated)

{com}. 
. **** Goldman Sachs* -- Date from Yann louvel reclaim finance
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Goldman_Sachs_2020.pdf
. gen ban_5853 = 1 if ((year > 2019 & ((isNew==1 & isPowerProj==1 & isHighCarbonProj==1) | /// No financing for new coal power plants that do not have low carbon policies
>                                 (isNew==1 & isMiningProj==1) |                                                                  /// No financing for new thermal coal mine
>                                 ((isNew==1 | isExpansion==1) & isMountaintopProj==1))))                                 // No Financing for MTR projects 
{txt}(385 missing values generated)

{com}.   
. **** Handelsbanken* 
. gen ban_6253 = 1 if ((year > 2019 & ((isMiningProj==1 | isPowerCo==1) & (isNew==1 | isExpansion==1) | /// No financing for new or developing Coal power plants or mines
>                            (isNewCustomer==1 & !hasNoDecarbonStrat==1)))) // Not deelop relations with clients active in coal sector and do not have a transition policy
{txt}(308 missing values generated)

{com}.         
. **** Hannoversche Beteiligungsgesellschaft- Synthetic_Bank_ID not known. No transactions.
. //gen ban_XX = 1 if ((year > 2019 & (isPowerProj))) ///Financing the construction of conventional coal-fired power plants.
. 
.            
. ****HSBC* 
. gen ban_6184 = 1 if (((year >= 2020 & (((isNew==1 |isExpansion==1) & isMiningProj==1) |                 /// No Financing for New or expansion of existing mining projects
>                         (isNewCustomer==1 & isMiningCo==1 & CoalFracRevParent > 0.5) |          /// Not take any new customers dependent (>50% of coal revenue) from coal
>                         (isMountaintopComp==1 & CountryParent == "USA") |                                       /// No finance for MTR firms in the USA
>                         (isMountaintopProj==1 & isMiningProj==1) |                                                      /// No finance for Mountaintop mines 
>                         ((isNew==1 | isExpansion==1) & isPowerProj==1 & isHighCarbonProj==1))) | ///
>                         (year >=2018 & (isNew==1 & isPowerProj==1 & (CountryParent != "Bangladesh" | CountryParent != "Indonesia" | CountryParent != "Vietnam")))))              // Banning finance for new or expanding power plants without a low carbon policy
{txt}(291 missing values generated)

{com}.         
. *** ING*
. gen ban_6757 = 1 if (((year >= 2019 & ((isNew==1 &(isMiningProj==1 | isPowerProj==1)) |                                                         /// No financing for new thermal coal power or coal mines
>                         (isNewCustomer==1 & (hasNoDecarbonStrat == 1 | CoalSharePowerParent> 0.1)))) |                          /// Ban new customers with sahre of power > 10%. Should also have a strat to reduce 5%
>                         (year >= 2025 & isPowerCo==1 & CoalFracRevParent > 0.05 ) | /// Ban Finance for all clients with coal revenue fraction less than 5%BY 2025 (How to code expectation of lower fraction in future?)
>                         (year > 2017 & CoalFracRevParent >0.1 & hasNoDecarbonStrat==1) | ///
>                         (year > 2015 & (isNew==1 & (isPowerProj==1 | (isThermal==1 & isMiningProj==1)) | ///
>                         (isNewCustomer==1 & CoalFracRevParent > 0.5)))))                                                                                
{txt}(215 missing values generated)

{com}.                    
. **** Intessa San Paolo* --- Date from Yann louvel excel file 
. gen ban_1317 = 1 if ((year >= 2020 & ((isNew==1 & isMiningProj==1) | ///
>                            (isMiningCo==1 & isMountaintopComp==1) | ///
>                            isPowerCo==1 & ((CoalSharePowerParent > 0.5 & CountryGroup == "Non-OECD") | (CoalSharePowerParent > 0.3 & CountryGroup == "OECD")))))
{txt}(363 missing values generated)

{com}. 
.                            
. **** Investec* 
. gen ban_7072 = 1 if ((year >=2020 & ((isMountaintopProj==1) | ///We will not finance mountaintop removal mining activities
>                            (isPowerProj==1 & isHighCarbonProj==1) |   ///Investec will not provide funding to new build of conventional plants*.
>                            (isExpansion==1 & hasNoDecarbonStrat==1))))   // not for expansion purposes unless it meets the required efficiency criteria  
{txt}(286 missing values generated)

{com}. 
. **** JPMorgan*
. gen ban_6179 = 1 if ((year >=2020 & ((isProjFin==1 & isNew==1 & isMiningProj==1) | /// No Project finance to develop new mines
>                            (isMiningCo==1 & CoalFracRevParent > .5) | ///Not provide lending, capital markets or advisory services to companies deriving the majority of their revenues from the extraction of coal
>                            (isMiningProj==1) | /// NO mountaintop projects
>                            (isPowerProj==1 & isProjFin==1 & isHighCarbonProj==1)))) | ///not provide project financing or other forms of asset-specific financing where the proceeds will be used to develop a new coal-fired power plant or refinance an existing coal-fired power plant
>                            ((year >= 2024 & isCorpFin == 1 & isMiningCo))
{txt}(264 missing values generated)

{com}.                            
.                            
. **** KB Financial* -- Date from Yann louvel excel file
. gen ban_7434 = 1 if ((year >2020 & (isProjFin==1 & isPowerProj==1 & isNew==1))) // Suspension of new project financing and bond underwriting for domestic and overseas coal-fired power plant construction
{txt}(410 missing values generated)

{com}. 
. ***** KBC* 
. gen ban_7439 = 1 if (((year > 2016 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1)) | ///
>                            (CountryParent == "Czech Republic" & isHighCarbonProj==1) | ///
>                            ((isPowerCo==1|isMiningCo==1) & CoalFracRevParent>0.5))) |                                 /// "2016 - No direct finance for coal mining and coal power projects worldwide, with an exception for Czech Republic. Exclusion of companies generating over 50% of their turnover from coal power."
>                            (year > 2018 & (((isPowerCo==1|isMiningCo==1) & CoalFracRevParent> 0.25) |                             /// "2018 - reduced to 25% and no finance without transition strat "
>                            (hasNoDecarbonStrat==1))) | ///
>                            (year >= 2020 & ((isNewCustomer==1 & isPowerCo==1 & CoalFracRevParent >= 0)))))  // "2020 - No new customer with any stake in coal"
{txt}(176 missing values generated)

{com}. 
. **** Kiwibank*
. gen ban_9432 = 1 if (year >= 2020 & (isMiningCo==1)) // banking services to entities that are directly involved in, or where the majority of their business revenue is from
{txt}(330 missing values generated)

{com}. 
. ** LBBW??
. 
. **** Lloyds Banking Group*
. gen ban_8286 =1 if ((year >= 2019 & ((isNew==1 & isPowerProj==1) | ///
>                            (isThermal==1 & isNew==1 & isMiningProj==1) | ///
>                            (isNewCustomer==1 & ((isMiningCo==1|isPowerCo==1) & CoalFracRevParent > 0.5)))))     // The Bank will not bank new clients where most of their revenue is  derived from coal-fired power stations or thermal coal mines                 
{txt}(332 missing values generated)

{com}.                 
. 
. **** mBank*
. gen ban_13818 = 1 if ((year>=2019 & (isNew==1 & (isMiningProj==1 | isPowerProj==1) | /// No financing for New mining or power projects
>                                 (isNewCustomer==1 & CoalSharePowerParent > 0.5)))) // Not engage with new clients with more than 50% in power generation capacity from coal
{txt}(320 missing values generated)

{com}.                                 
. 
. **** Mizuho* -- Date from Yann louvel excel file 
. gen ban_8939 = 1 if (((year >= 2020 & ((isNewCustomer==1 & (isNew==1 | isExpansion==1) & isPowerProj==1) | /// No financing for new customers for new powerprojects
>                            (isMountaintopProj==1))) | /// No financing for Mountaintop projects
>                            (year >= 2021 & (isNew==1 | isExpansion==1) & isPowerProj==1)))
{txt}(378 missing values generated)

{com}. 
. **** Morgan Stanley*
. gen ban_9031 = 1 if ((year >2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj==1) | ///We will not finance transactions globally that directly support the development of new or physical expansions of coal-fired power generation
>                                          (isMountaintopProj==1 & isMiningCo ==1) | ///
>                                          (isNew==1 & isThermal==1 & isMiningProj == 1))))
{txt}(370 missing values generated)

{com}. 
. ***** MUFG*
. gen ban_8917 = 1 if ((year >= 2020 & ((isNew==1 & isPowerProj==1) | ///MUFG will not provide financing to new coal fired power generation project
>                            (isMountaintopProj==1)))) //We will not provide any financing to coal mining projects using the mountaintop removal
{txt}(407 missing values generated)

{com}.                            
. **** NAB* 
. gen ban_9227 = 1 if ((year > 2017 & (isNew==1 & isThermal==1 & isMiningProj==1)) | /// No new thermal coal mines
>                            (year > 2019 & ((isThermal==1 & isNewCustomer==1 & isMiningProj==1) | /// New thermal coal mining projects or new-to-bank thermal coal mining customers.
>                            (isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj == 1 )))) // NAB will not finance new or material expansions of coal-fired power generation facilities unless there is technology in place to materially reduce emissions.
{txt}(328 missing values generated)

{com}. 
. ***** Natwest* 
. gen ban_11026 = 1 if (((year >= 2018 & ((isNew==1 & isPowerProj==1) |                                                   ///New coal fired power stations
>                                 (isThermal==1 & isMiningProj==1 & isNew==1) |                                                   ///New thermal coal mines
>                                 (isMiningCo==1 & isThermal==1 & CoalFracRevParent > 0.4) |                      ///Mining companies generating more than 40% of their revenues from thermal coal
>                                 (isPowerCo==1 & CoalSharePowerParent>0.4))) |                                           /// Power companies generating more than 40% of their electricity from coal                
>                                 (year > 2021 & ((isMiningCo==1 & CoalFracRevParent>0.15) | (isPowerCo==1 & CoalFracRevParent>0.15))) | /// Stop lending and underwriting to companies with >15% of activitiesrelated to thermal and lignite coal
>                                 (year > 2021 & (hasNoDecarbonStrat==1))))                                                       // Stop lending without a transition.
{txt}(220 missing values generated)

{com}. 
. **** NBS* -- Date taken from Yann Louvel reclaim finance
. gen ban_9374 = 1 if ((year >= 2019 & ((isPowerProj==1 & isNew==1) | ///Not provide financing to any new coal-fired power stations regardless of technology or jurisdiction
>                            (isMiningProj==1 & isNew==1 & isThermal==1 & CountryParent != "South Africa") | ///Not provide financing to thermal coal mines outside of South Africa
>                            (isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.4)))) //Thermal coal mining company relates to mining companies that derive more than 40% of their revenue from thermal coal mining
{txt}(356 missing values generated)

{com}.                                 
. *** Nippon Life* -- Adopted from Yanna Louvel
. gen ban_9480 = 1 if ((year > 2018 & (isNew==1 & isPowerProj==1))) // not to engage in new investment and financing in coal-fired power generation projects anywhere in Japan or overseas.
{txt}(404 missing values generated)

{com}. 
. *** Nordea*   ---- QUESTION
. gen ban_9527 = 1 if (((year > 2015 & (isNewCustomer==1 & (CoalFracRevParent == 1 | CoalSharePowerParent == 1))) | ///not to start new customer relationships with companies primarily dependent on coal
>                                 (year > 2020 &((isThermal==1 & isNewCustomer==1 & ((isMiningCo==1 & CoalFracRevParent > 0.5) | (isPowerCo==1 & CoalSharePowerParent > 0.5))) | ///not start any new banking relationships with companies that are pre-dominantly dependent on thermal coal, including coal-fred energy production and/or mining companies
>                                 (hasNoDecarbonStrat==1) | ///
>                                 ((isPowerCo==1 & CoalFracRevParent > 0.3) | (isMiningCo==1 & CoalFracRevParent > 0.3)))))) // does not invest in companies that have large and sustained exposure to thermal coal mining and more than 30%of their revenues derived from sales of coal products
{txt}(205 missing values generated)

{com}. 
. **** Norinchukin*
. gen ban_9543 =1 if(( year > 2019 & (isPowerProj==1 & isNew==1))) // NO financing for new power projects
{txt}(407 missing values generated)

{com}. 
. 
. **** OCBC*
. gen ban_9943 = 1 if ((year >= 2019 & (isPowerProj==1 & isNew==1))) // NO financing for new power projects
{txt}(404 missing values generated)

{com}. 
. ***PKO BP* 
. gen ban_10009 = 1 if ((year >= 2019 & (isMiningProj==1 & isNew==1))) // NO financing for new mining projects
{txt}(416 missing values generated)

{com}. 
. ***PNC* -- Date taken from Yann louvel 
. gen ban_10016 = 1 if ((year > 2017 & (isNewCustomer==1))) // How to do this---->more than a de minimis exposure to mountaintop removal mining?
{txt}(323 missing values generated)

{com}. 
. ***Rabobank* -- Date taken from yann louvel excel file
. gen ban_10773 = 1 if ((year >= 2017 & (isPowerCo==1 | isMiningCo==1)))
{txt}(160 missing values generated)

{com}. /*
> • directly finance the exploration, extraction or production of coal used for
> power generation, shale gas, tar sands and other nonconventional fossil
> natural resources, nor the transport up to the production unit, production,
> processing, or refining of these extractive industries products;
> • directly finance coal-fired power generation;
> • directly finance the trade of coal for power generation. We may directly
> finance the trade of higher grade metallurgical coals used for the
> production of steel and base metals only;
> • finance companies that realize more than 20% of their turnover in trading
> coal used for power generation.
> */
. 
. ***Raiffeisen*
. gen ban_10781 = 1 if ((year >= 2019 & ((isNew==1 & isThermal==1 & isMiningProj==1) | ///
>                                 (isNewCustomer==1 & isThermal==1 & isMiningCo==1)| ///
>                                 (isThermal==1 & isMiningCo==1)))) //customers in the thermal coal mining sector or companies where more than 50 percent of the revenue is generated from thermal coal trading.
{txt}(368 missing values generated)

{com}. 
. ***RBC*
. gen ban_10727 = 1 if ((year > 2020 & ((isNew==1 & isThermal==1 & isMiningProj==1) | ///
>                                 (isMountaintopProj==1) | /// new greenfield coal-fired power plant, thermal coal mine or Mountain Top Removal coal mining projects.
>                                 (isNewCustomer==1 & ((isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.6) | (isPowerCo==1 & CoalSharePowerParent> 0.6)) & hasNoDecarbonStrat==1))))                         //will not provide financing to new clients that operate significant thermal coal mining (>60% revenue) or coal power generation assets (>60% generation, Megawatt hour (MwH).
{txt}(380 missing values generated)

{com}.                          
.                                 
. ***Resona Holdings*
. gen ban_10909 = 1 if ((year >= 2019 & ((isProjFin==1 & isNew==1 & isThermal==1 & isPowerProj==1))))
{txt}(404 missing values generated)

{com}. 
. ***Rothschild & co*
. gen ban_9146 = 1 if ((year >= 2020 & ((isThermal==1) | ///
>                                 (isThermal==1 & isMiningProj==1 & isNew==1)| ///
>                                 (isNew==1 & isPowerProj==1)))) // not provide financing or financing advisory in relation to new thermal coal mining projects, new thermal coal developments or new coal-fired power generation assets
{txt}(264 missing values generated)

{com}. 
. 
. ***Samsung* -- From the Yann Louvel Excel file as link is empty
. gen ban_11256 = 1 if ((year > 2020 & isNew==1))
{txt}(390 missing values generated)

{com}. 
. ****Santander*
. gen ban_1527 = 1 if ((year >= 2020 & ((isNew==1 & isPowerProj==1)| ///New coal-fired Power Plants projects worldwide.
>                                 (isNewCustomer==1 & isPowerCo==1) | ///New clients with coal-fired power plants worldwide.
>                                 (isPowerProj==1 & isHighCarbonProj==1)))) //For existing clients: Transactions specific to coal power plants are allowed only when they improve significantly environmental impacts
{txt}(330 missing values generated)

{com}. 
. ****SEB* --- From Yann Louvel Excel File
. gen ban_11100 = 1 if ((year > 2015 & ((isNewCustomer==1 & isMiningCo==1 & CoalFracRevParent > 0.5) |  ////Exclusion of companies with major business in coal mining for new clients.
>                                 (isPowerProj==1)))) //Ending financing for coal power projects worldwide.
{txt}(230 missing values generated)

{com}. 
. ***Shinhan* -- Exact carbon emission listed, should we use isLowCarbonProj? -- Date from Yann Louvel excel file
. gen ban_11616 = 1 if ((year>2020 & isProjFin==1 & isHighCarbonProj==1 & CountryGroup == "OECD"))
{txt}(330 missing values generated)

{com}.  
. ****Shinsei Bank*
. gen ban_11628 = 1 if ((year >= 2020 & ((isThermal==1 & isPowerProj==1)))) //new investment and lending to coal-fired thermal power plants will not be provided either in Japan or overseas, in principle, based on a preventive approach
{txt}(330 missing values generated)

{com}. 
. ****Societe Generale*
. gen ban_11775 = 1 if (((year > 2015 & ((isProjFin==1 & isMiningProj==1 & (isExpansion ==1 | isNew ==1)) | /// No project financing of development of coal mines
>                            (isPowerProj==1 & isProjFin==1 & (isNew==1 | isExpansion==1)) | ///& CountryGroup == "High Income OECD") | ///no longer be involved in project financing of coal-fired power plants in high income OECD countries
>                            (isMountaintopComp==1)))  | /// does not offer financial products and services to clients who are involved in Mountain Top Removal 
>                            (year >= 2019 & ((isThermal==1 & ((isMiningCo==1 |isPowerCo ==1 & CoalFracRevParent > 0.5)) | /// No financing to the clients whose current activity in thermal coal* represents 50% or more
>                            (isThermal==1 & (((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent < 0.5 & CoalFracRevParent> 0.3)) & hasNoDecarbonStrat==1) | /// whose current activity in thermal coal represents between 30% and 50% and do not have a reduction strategy to reach at most 30% by 2025
>                            (isExpansion==1 & (isMiningCo==1 | isPowerCo==1))))) | /// who have plans to expand their thermal coal capacities
>                            (year >= 2020 & ((isThermal==1 & (isMiningCo==1 | isPowerCo==1)) | ///are Thermal Coal Developing Companies6 or -- 2020 date taken from yann louvel excel file
>                            (isThermal==1 & (((isMiningCo==1 & isPowerCo==1) & CoalFracRevParent > 0.25))))) | ///have more than 25% of their revenue linked to the Thermal coal sector7 or
>                            (year > 2021 & hasNoDecarbonStrat == 1))) // Does not have a transition plan.
{txt}(170 missing values generated)

{com}.                            
. //  Sparkassen- und Giroverband Hessen-Thüringen (Helaba)* 
. gen ban_8081  = 1 if ((year > 2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No financing for projects involving the construction of new coal-fired power plants or for expanding the capacity of existing coal-fired power plants
>                            (isNewCustomer==1 & (isMiningCo==1 | isPowerCo==1)) | /// No financing of new corporate clients whose business predominantly involves coal-based energy (coal mining or coal-fired power plants)
>                            (isMiningProj==1 & (isNew==1 | isExpansion==1)) | /// No financing of projects directly related to the mining of power plant coal, including process chains directly and exclusively associated
>                            (isMountaintopProj==1) | ///No financing of projects in connection with mountaintop removal mining
>                            (isPowerCo==1 & CoalFracRevParent>0.25))))
{txt}(280 missing values generated)

{com}.                 
. 
. ***Standard Bank*
. gen ban_12090 = 1 if ((year >= 2019 & (isNew==1 & isPowerProj==1 & isHighCarbonProj == 1 ))) //& CountryGroup != "IDA"))) /// IDA - Overseen by 173 shareholder nations, IDA aims to reduce poverty by providing loans (called "credits") and grants for programs that boost economic growth, reduce inequalities, and improve people's living conditions. IDA lends money on concessional terms.
{txt}(404 missing values generated)

{com}. 
. ***Standard Chartered* 
. gen ban_12093 = 1 if (((year > 2018 & ((isNew==1 & isMiningProj==1 & isThermal==1)| /// New standalone non-captive thermal coal mining projects -- Date taken from Yann louvel
>                            ((isNew==1 | isExpansion==1) & isPowerProj==1 & isHighCarbonProj==1) | ///New coal-fired power plant projects in any location; Any coal-fired power plant expansions, retrofits or dedicated infrastructure, in any location
>                            (isMountaintopProj==1)))|  /// Mining operations that conduct Appalachian Mountaintop Removal
>                            (year >= 2021 & (isThermal==1 & (((isMiningCo==1 |isPowerCo==1) & CoalFracRevParent == 1.00)))) | ///By January 2021, we will have no group level clients who are 100% dependent on earnings from thermal coal
>                            (year >= 2025 & (isThermal==1 & (((isMiningCo==1 |isPowerCo==1) & CoalFracRevParent > 0.60)))) | ///By January 2025, we will extend this threshold to group level clients who are greater than 60% dependent on earnings from thermal coal
>                            (year >= 2027 & (isThermal==1 & (((isMiningCo==1 |isPowerCo==1) & CoalFracRevParent> 0.40)))) | ///greater than 40% dependent on earnings from thermal coal
>                            (year >= 2030 & (isThermal==1 & (((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent > 0.10)))))) // By January 2030, we will extend this threshold to group level clients who are greater than 10% dependent on earnings from thermal coal
{txt}(312 missing values generated)

{com}.                            
. 
. ****Sumitomo Mitsui Financial Group* -- Date taken from Yann louvel
. gen ban_12295 = 1 if ((year >2020 & (((isNew==1 | isExpansion==1) & isPowerProj==1)| ///
>                            (isMountaintopProj==1)))) // Support for newly planned coal-fired power plants and the expansion of existing plants are not provided
{txt}(380 missing values generated)

{com}. 
. ****Sumitomo Mitsui Trust Holdings* -- Date taken from Yann louvel
. gen ban_12296 = 1 if ((year >= 2019 & (isNew==1 & isPowerProj==1) & isProjFin == 1)) // SuMi TRUST Bank has decided, in principle, not to engage in new projects for the construction of coal-fired power plants
{txt}(404 missing values generated)

{com}. 
. ***Swedbank*
. gen ban_12367 = 1 if ((year > 2018 & ((((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent>0.05))|  /// We will not provide financial services to companies mining and producing coal to more than 5% of its revenue
>                             (isNew==1 & isPowerProj==1)))) // We will not directly finance coal-fired power production or the establishment of new coal-fired power plants
{txt}(260 missing values generated)

{com}.                                  
. *****TD* (unkonwn year WaybackMachine suggests 2017, Page source code says 2020)
. gen ban_12752 = 1 if year > 2020 & (isMountaintopProj==1 & isMiningProj==1)
{txt}(440 missing values generated)

{com}. 
. ***Toho*
. gen ban_12684 = 1 if ((year >= 2020 & (isNew==1 & isPowerProj==1)))
{txt}(407 missing values generated)

{com}. 
. ****UBS*
. gen ban_12925 = 1 if ((year > 2020 & ((isNew==1 & isPowerProj==1)| ///Not providing project-level finance to new coal-fired power plants globally
>                        (isPowerCo==1 & CoalSharePowerParent>0.3 & hasNoDecarbonStrat==1 & isHighCarbonProj==1) | ///Only supporting financing to transactions of existing coal-fired operators (>30% coal reliance)who have a transition strategy in place, or if the transaction is related to renewable energy
>                            (isMiningProj==1 & isThermal==1 & (isNew==1 | isExpansion==1))| ///Not providing financing where the stated use of proceeds is for greenfield1 thermal coal mines
>                            (isMountaintopComp==1)))) //Not providing financing to coal-mining companies engaged in MTR operations
{txt}(350 missing values generated)

{com}. 
. ***Unicredit* 
. gen ban_9042 = 1 if ((year > 2020 & ((isProjFin==1) | ///
>                            (isExpansion == 1) | /// No Project finance or Expansion finances
>                            ((isMiningCo == 1|isPowerCo== 1) & CoalFracRevParent > 0.25 & hasNoDecarbonStrat == 1)))) // No financing for companies above 25% of revenue from coal unless they have a plan to exit by 2030
{txt}(300 missing values generated)

{com}. 
. ****United Overseas Bank (UOB)* 
. gen ban_13101 = 1 if ((year >= 2019 & ((isNew==1 & isPowerProj==1) | ///
>                            (isProjFin==1 & isMiningProj==1 & isNew==1 & isThermal==1)) )) //Discontinued new financing of coal-fired power plant projects and prohibited the project financing of greenfield thermal coal mines
{txt}(392 missing values generated)

{com}. 
. ****US Bancorp*
. gen ban_12946 = 1 if ((year > 2021 & ((isMountaintopProj==1) | /// No participation in Mountaintop projects
>                            (isProjFin==1 & isNew==1 & isMiningProj==1) | /// we will not participate in any relationship involving or provide project financing or other forms of asset-specific financing for the development of new coal mines.
>                            (isPowerProj==1 & isProjFin==1 & (isNew==1 | isExpansion==1))))) //direct project financing of coal-fired power plants and relationships that involve constructing such plants.
{txt}(368 missing values generated)

{com}.                            
. ***Wells Fargo*-- Date from Yann Louvel Excel file 
. gen ban_13490 = 1 if( (year > 2015 & (isMountaintopProj==1)))
{txt}(440 missing values generated)

{com}. 
. 
. ****Westpac -- Link not found* -- Date from Yann Louvel Excel file 
. gen ban_13563 =1 if ((year >= 2017 & ((isThermal==1 & isNew == 1 & isMiningProj==1) | (isPowerProj==1))))
{txt}(286 missing values generated)

{com}. /*
> •     Ending direct finance for new thermal coal mines projects in new coal producing basins or where the calorific value is not in the top 15% globally.
> •     Exclusion of coal mining companies that have a calorific value which  &does not rank in the top quartile globally.
> •     Ending direct finance for new coal power generation where it does not reduce the emissions intensity of the grid in which the generator operates.
> 
> ***Zurcher Kantonalbank 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
{txt}
{com}. 
. 
. //save bank x year x scenario ban dataset 
. preserve 
{txt}
{com}. keep if scenario > 100
{txt}(308 observations deleted)

{com}. greshape long ban_, i(scenario year) j(BankID)
{res}{txt}(note: j = 50 967 981 1043 1106 1124 1261 1317 1527 1869 2263 2311 2351 2683 2726 2737 2869 3388 3536 3731 3966 4100 4107 4128 4176 4229 4293 4309 4462 5853 6179 6184 6253 6757 7072 7434 7439 8081 8286 8917 8939 9031 9042 9146 9227 9374 9432 9480 9527 9543 9943 10009 10016 10727 10773 10781 10909 11026 11100 11256 11616 11628 11775 12090 12093 12295 12296 12367 12684 12752 12925 12946 13101 13490 13563 13818 15000)
{res}{txt}{res}{txt}
Data{col 36}wide{col 43}->{col 48}long
{hline 77}
Number of obs.{col 19}{res}                  132{txt}{col 43}->   {res}10,164               
{txt}Number of variables{col 19}{res}                  101{txt}{col 43}->   {res}26                   
{txt}j (77 values)         {col 43}->{col 48}{res}BankID
{txt}xij variables:
           {res}ban_50 ban_967 ... ban_15000{col 43}{txt}->{res}{col 48}ban_
{txt}{hline 77}
{res}{txt}
{com}. order scenario year BankID
{txt}
{com}. sort BankID year scenario
{txt}
{com}. replace ban_ = 0 if missing(ban_)
{txt}(7,850 real changes made)

{com}. gen scenario_str = "Power ProjFin New" if scenario == 101
{txt}(8,470 missing values generated)

{com}. replace scenario_str = "Power ProjFin Expansion" if scenario == 102
{txt}variable {bf}{res}scenario_str{sf}{txt} was {bf}{res}str17{sf}{txt} now {bf}{res}str23{sf}
{txt}(1,694 real changes made)

{com}. replace scenario_str = "Power CorpFin" if scenario == 103
{txt}(1,694 real changes made)

{com}. replace scenario_str = "Mining ProjFin New" if scenario == 104
{txt}(1,694 real changes made)

{com}. replace scenario_str = "Mining ProjFin Expansion" if scenario == 105
{txt}variable {bf}{res}scenario_str{sf}{txt} was {bf}{res}str23{sf}{txt} now {bf}{res}str24{sf}
{txt}(1,694 real changes made)

{com}. replace scenario_str = "Mining CorpFin" if scenario == 106
{txt}(1,694 real changes made)

{com}. keep scenario scenario_str BankID ban_ year 
{txt}
{com}. order scenario scenario_str year BankID ban_ 
{txt}
{com}. rename ban_ ban 
{res}{txt}
{com}. save ../Intermediate/broad_scenarios_bank_year_ban, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/broad_scenarios_bank_year_ban.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/broad_scenarios_bank_year_ban.dta{rm}
saved
{p_end}

{com}. restore
{txt}
{com}. //get rid of extra secenarios used for graph
. drop if scenario > 100
{txt}(132 observations deleted)

{com}. 
. gen power_scenario = inrange(scenario,1,7)
{txt}
{com}. gen mining_scenario = inrange(scenario,8,14)
{txt}
{com}. 
. 
. *scenarios applying to firms not expanding
. gen nongrowth_scenario= inrange(scenario,5,7) | inrange(scenario,12,14)
{txt}
{com}. 
. gen lowgrowth_scenario= inrange(scenario,3,7) | inrange(scenario,10,14)
{txt}
{com}. 
. 
. *scenarios applying to firms with low coal share
. gen lowshare_scenario= inrange(scenario,6,7) | inrange(scenario,13,14)
{txt}
{com}. 
. gen highshare_scenario= 1-lowshare_scenario
{txt}
{com}. 
. **that may not be enough scenarios conditional on that variable, for instance don't account for expansion.
. 
. 
. count if year == 2009
  {res}14
{txt}
{com}. local scenario_count = r(N)
{txt}
{com}. count if year == 2009 & power_scenario
  {res}7
{txt}
{com}. local scenario_count_power = r(N)
{txt}
{com}. count if year == 2009 & mining_scenario
  {res}7
{txt}
{com}. local scenario_count_mining = r(N)
{txt}
{com}. count if year == 2009 & nongrowth_scenario
  {res}6
{txt}
{com}. local scenario_count_nongrowth = r(N)
{txt}
{com}. count if year == 2009 & lowgrowth_scenario
  {res}10
{txt}
{com}. local scenario_count_lowgrowth = r(N)
{txt}
{com}. count if year == 2009 & lowshare_scenario
  {res}4
{txt}
{com}. local scenario_count_lowshare = r(N)
{txt}
{com}. count if year == 2009 & highshare_scenario
  {res}10
{txt}
{com}. local scenario_count_highshare = r(N)
{txt}
{com}. 
. foreach var of var ban_* {c -(}
{txt}  2{com}.         local bank = substr("`var'",5,.)
{txt}  3{com}.         gen ban_power_`bank' = `var'*power_scenario
{txt}  4{com}.         gen ban_mining_`bank' = `var'*mining_scenario 
{txt}  5{com}.         gen ban_nongrowth_`bank' = `var'*nongrowth_scenario 
{txt}  6{com}.         gen ban_lowgrowth_`bank' = `var'*lowgrowth_scenario 
{txt}  7{com}.         gen ban_lowshare_`bank' = `var'*lowshare_scenario 
{txt}  8{com}.         gen ban_highshare_`bank' = `var'*highshare_scenario 
{txt}  9{com}. 
. {c )-}
{txt}(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(154 missing values generated)
(154 missing values generated)
(154 missing values generated)
(154 missing values generated)
(154 missing values generated)
(154 missing values generated)
(222 missing values generated)
(222 missing values generated)
(222 missing values generated)
(222 missing values generated)
(222 missing values generated)
(222 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(178 missing values generated)
(178 missing values generated)
(178 missing values generated)
(178 missing values generated)
(178 missing values generated)
(178 missing values generated)
(70 missing values generated)
(70 missing values generated)
(70 missing values generated)
(70 missing values generated)
(70 missing values generated)
(70 missing values generated)
(202 missing values generated)
(202 missing values generated)
(202 missing values generated)
(202 missing values generated)
(202 missing values generated)
(202 missing values generated)
(181 missing values generated)
(181 missing values generated)
(181 missing values generated)
(181 missing values generated)
(181 missing values generated)
(181 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(235 missing values generated)
(235 missing values generated)
(235 missing values generated)
(235 missing values generated)
(235 missing values generated)
(235 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(203 missing values generated)
(203 missing values generated)
(203 missing values generated)
(203 missing values generated)
(203 missing values generated)
(203 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(168 missing values generated)
(232 missing values generated)
(232 missing values generated)
(232 missing values generated)
(232 missing values generated)
(232 missing values generated)
(232 missing values generated)
(252 missing values generated)
(252 missing values generated)
(252 missing values generated)
(252 missing values generated)
(252 missing values generated)
(252 missing values generated)
(156 missing values generated)
(156 missing values generated)
(156 missing values generated)
(156 missing values generated)
(156 missing values generated)
(156 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(264 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(180 missing values generated)
(275 missing values generated)
(275 missing values generated)
(275 missing values generated)
(275 missing values generated)
(275 missing values generated)
(275 missing values generated)
(220 missing values generated)
(220 missing values generated)
(220 missing values generated)
(220 missing values generated)
(220 missing values generated)
(220 missing values generated)
(205 missing values generated)
(205 missing values generated)
(205 missing values generated)
(205 missing values generated)
(205 missing values generated)
(205 missing values generated)
(110 missing values generated)
(110 missing values generated)
(110 missing values generated)
(110 missing values generated)
(110 missing values generated)
(110 missing values generated)
(242 missing values generated)
(242 missing values generated)
(242 missing values generated)
(242 missing values generated)
(242 missing values generated)
(242 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(198 missing values generated)
(187 missing values generated)
(187 missing values generated)
(187 missing values generated)
(187 missing values generated)
(187 missing values generated)
(187 missing values generated)
(288 missing values generated)
(288 missing values generated)
(288 missing values generated)
(288 missing values generated)
(288 missing values generated)
(288 missing values generated)
(120 missing values generated)
(120 missing values generated)
(120 missing values generated)
(120 missing values generated)
(120 missing values generated)
(120 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(212 missing values generated)
(266 missing values generated)
(266 missing values generated)
(266 missing values generated)
(266 missing values generated)
(266 missing values generated)
(266 missing values generated)
(258 missing values generated)
(258 missing values generated)
(258 missing values generated)
(258 missing values generated)
(258 missing values generated)
(258 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(218 missing values generated)
(218 missing values generated)
(218 missing values generated)
(218 missing values generated)
(218 missing values generated)
(218 missing values generated)
(146 missing values generated)
(146 missing values generated)
(146 missing values generated)
(146 missing values generated)
(146 missing values generated)
(146 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(133 missing values generated)
(133 missing values generated)
(133 missing values generated)
(133 missing values generated)
(133 missing values generated)
(133 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(296 missing values generated)
(296 missing values generated)
(296 missing values generated)
(296 missing values generated)
(296 missing values generated)
(296 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(191 missing values generated)
(112 missing values generated)
(112 missing values generated)
(112 missing values generated)
(112 missing values generated)
(112 missing values generated)
(112 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(236 missing values generated)
(248 missing values generated)
(248 missing values generated)
(248 missing values generated)
(248 missing values generated)
(248 missing values generated)
(248 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(165 missing values generated)
(165 missing values generated)
(165 missing values generated)
(165 missing values generated)
(165 missing values generated)
(165 missing values generated)
(278 missing values generated)
(278 missing values generated)
(278 missing values generated)
(278 missing values generated)
(278 missing values generated)
(278 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(143 missing values generated)
(238 missing values generated)
(238 missing values generated)
(238 missing values generated)
(238 missing values generated)
(238 missing values generated)
(238 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(231 missing values generated)
(118 missing values generated)
(118 missing values generated)
(118 missing values generated)
(118 missing values generated)
(118 missing values generated)
(118 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(188 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(204 missing values generated)
(204 missing values generated)
(204 missing values generated)
(204 missing values generated)
(204 missing values generated)
(204 missing values generated)
(268 missing values generated)
(268 missing values generated)
(268 missing values generated)
(268 missing values generated)
(268 missing values generated)
(268 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(284 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(140 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(286 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(228 missing values generated)
(208 missing values generated)
(208 missing values generated)
(208 missing values generated)
(208 missing values generated)
(208 missing values generated)
(208 missing values generated)
(272 missing values generated)
(272 missing values generated)
(272 missing values generated)
(272 missing values generated)
(272 missing values generated)
(272 missing values generated)
(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(263 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(308 missing values generated)
(196 missing values generated)
(196 missing values generated)
(196 missing values generated)
(196 missing values generated)
(196 missing values generated)
(196 missing values generated)

{com}. 
. 
. 
. 
. gcollapse (sum) ban_*, by(year)
{res}{txt}{res}{txt}{res}{txt}
{com}. greshape long ban_ ban_power_ ban_mining_ ban_nongrowth_ ban_lowgrowth_ ban_lowshare_ ban_highshare_, i(year) j(BankID)
{res}{txt}(note: j = 50 967 981 1043 1106 1124 1261 1317 1527 1869 2263 2311 2351 2683 2726 2737 2869 3388 3536 3731 3966 4100 4107 4128 4176 4229 4293 4309 4462 5853 6179 6184 6253 6757 7072 7434 7439 8081 8286 8917 8939 9031 9042 9146 9227 9374 9432 9480 9527 9543 9943 10009 10016 10727 10773 10781 10909 11026 11100 11256 11616 11628 11775 12090 12093 12295 12296 12367 12684 12752 12925 12946 13101 13490 13563 13818 15000)
{res}(note: cannot preserve labels when reshaping long)
{txt}{res}{txt}
Data{col 36}wide{col 43}->{col 48}long
{hline 77}
Number of obs.{col 19}{res}                   22{txt}{col 43}->   {res}1,694                
{txt}Number of variables{col 19}{res}                  540{txt}{col 43}->   {res}9                    
{txt}j (77 values)         {col 43}->{col 48}{res}BankID
{txt}xij variables:
           {res}ban_50 ban_967 ... ban_15000{col 43}{txt}->{res}{col 48}ban_
ban_power_50 ban_power_967 ... ban_power_15000{col 43}{txt}->{res}{col 48}ban_power_
ban_mining_50 ban_mining_967 ... ban_mining_15000{col 43}{txt}->{res}{col 48}ban_mining_
ban_nongrowth_50 ban_nongrowth_967 ... ban_nongrowth_15000{col 43}{txt}->{res}{col 48}ban_nongrowth_
ban_lowgrowth_50 ban_lowgrowth_967 ... ban_lowgrowth_15000{col 43}{txt}->{res}{col 48}ban_lowgrowth_
ban_lowshare_50 ban_lowshare_967 ... ban_lowshare_15000{col 43}{txt}->{res}{col 48}ban_lowshare_
ban_highshare_50 ban_highshare_967 ... ban_highshare_15000{col 43}{txt}->{res}{col 48}ban_highshare_
{txt}{hline 77}
{res}{txt}
{com}. rename ban_ banned_scenario_count
{res}{txt}
{com}. gen ban_intensity = banned_scenario_count/`scenario_count'
{txt}
{com}. gen ban_intensity_power = ban_power_/`scenario_count_power'
{txt}
{com}. gen ban_intensity_mining = ban_mining_/`scenario_count_mining'
{txt}
{com}. gen ban_intensity_nongrowth = ban_nongrowth_/`scenario_count_nongrowth'
{txt}
{com}. gen ban_intensity_lowgrowth = ban_lowgrowth_/`scenario_count_lowgrowth'
{txt}
{com}. gen ban_intensity_lowshare = ban_lowshare_/`scenario_count_lowshare'
{txt}
{com}. gen ban_intensity_highshare = ban_highshare_/`scenario_count_highshare'
{txt}
{com}. 
. 
. 
. sort BankID year
{txt}
{com}. order BankID year
{txt}
{com}. 
. keep BankID year ban_intensity ban_intensity_power ban_intensity_mining ban_intensity_nongrowth ban_intensity_lowgrowth ban_intensity_lowshare ban_intensity_highshare ban_lowshare_ ban_highshare_
{txt}
{com}. ren ban_intensity ban_intensity_new1
{res}{txt}
{com}. compress
  {txt}variable {bf}{res}BankID{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}ban_lowshare_{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}ban_highshare_{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}byte{sf}
{txt}  (30,492 bytes saved)

{com}. save ../Intermediate/policy_intensity_yearly_new, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/policy_intensity_yearly_new.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/policy_intensity_yearly_new.dta{rm}
saved
{p_end}

{com}. 
. 
. ********************************************************************************
. *  POLICY CODING WITHOUT UPDATING DIVESTMENT POLICY
. ********************************************************************************
. use "../Intermediate/policy_coding_setup_blank", clear
{txt}
{com}. include "../Data_Cleaning/Policy_Coding_Function_Min.do"
{txt}
{com}. 
. 
. 
. 
. /*
> BANKS WITH MULTIPLE SETS
> 
> International Finance 2017
> 1. ANZ 2018 
> 2. BBVA 2018
> 3. Credit_Agricole_2016
> 4. Credit_Mutuel_2019
> 5. Credit_Suisse_2017
> 6. ING_2015.pdf
> 7. KBC_2016.pdf
> 8. Mizuho_2020
> 10. NAB_2017
> 11. Natwest_2018
> 12. Nordea_2015
> 13. Soceite Generale_2015
> 14. Standard_chartered_2018
> 
> 
> */
. 
. 
. ** ANZ*
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ANZ_2020.pdf 
. gen ban_967 = 1 if (year >= 2018 & ((isMiningProj==1 & isNew==1) |              ///no financing for new conventional coal-fired power stations
>                                         (CoalFracRevParent > 0.5)))
{txt}(297 missing values generated)

{com}. 
. 
. 
. 
. **** BBVA*
. gen ban_1043 = 1 if ((year >= 2018 & ((isNew==1 & (isPowerProj==1 | isMiningProj==1)) | /// would not finance any new coal mines and coal-fired power stations or extensions to existing ones
>                                 ((isMiningCo==1 | isPowerCo==1) & CoalSharePowerParent>= 0.4)))) // would exclude companies relying on coal for more than 40 per cent of their mining or power generation activity. 
{txt}(284 missing values generated)

{com}. 
. //BBVA said it would not finance any new coal mines and coal-fired power stations or extensions to existing ones and would exclude companies relying on coal for more than 40 per cent of their mining or power generation activity.
. 
. 
. 
. 
. **** Credit Agricole*
. gen ban_981 =1 if  (year > 2016) & (((isNew==1 | isExpansion==1) & isMiningCo==1) | /// 
>                                         ((isNew==1 | isExpansion==1) & isPowerProj==1))
{txt}(272 missing values generated)

{com}. 
.                                                 *No longer finance coal mines or operators specialising in this area worldwide
.                                                 *Crédit Agricole has decided to stop financing new coal-fired power plants or extensions.
. 
. 
. 
.                                    
. **** Credit Mutuel*
. *PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Credit_Mutuel_2020.pdf
. gen ban_2726 = 1 if (year >= 2019) & ///
>                                 ((isNew==1 & isPowerProj==1) | ///Crédit Mutuel Alliance Fédérale states that it intends to refrain from participating in operations related to the building of new coal-fired power plant
>                                 (CoalFracRevParent >= 0.5 & (isMiningCo==1 | isPowerCo==1)) | ///refrain from entering into relations with companies whose main activity consists in coal mining or is over 50% related to coal sector activities
>                                 (isHighCarbonProj == 1))                           
{txt}(200 missing values generated)

{com}. 
. 
. ***** Credit_Suisse*
. gen ban_3966 = 1 if (year > 2016 & (isMountaintopProj==1)) | /// No finances for Mountaintop Projects 
>                                 (year>2017 & ((isThermal==1 & isNew==1 & isMiningProj==1) | /// No financing for new thermal mines
>                                 (isPowerProj==1 & isNew==1 & isHighCarbonProj==1))) // No financing for new coal power plants unless low carbon technology used
{txt}(388 missing values generated)

{com}. 
. *** ING*
. gen ban_6757 = 1 if (year > 2015 & (isNew==1 & (isPowerProj==1 | (isThermal==1 & isMiningProj==1)) | ///
>                         (isNewCustomer==1 & CoalFracRevParent > 0.5)))  
{txt}(305 missing values generated)

{com}. 
. 
. 
. ***** KBC* 
. gen ban_7439 = 1 if (year > 2016 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1)) | ///
>                            (CountryParent == "Czech Republic" & isHighCarbonProj==1) | ///
>                            ((isPowerCo==1|isMiningCo==1) & CoalFracRevParent>0.5)))                                  // "2016 - No direct finance for coal mining and coal power projects worldwide, with an exception for Czech Republic. Exclusion of companies generating over 50% of their turnover from coal power."
{txt}(272 missing values generated)

{com}. 
.                            
. **** Mizuho* -- Date from Yann louvel excel file 
. gen ban_8939 = 1 if (year >= 2020 & ((isNewCustomer==1 & (isNew==1 | isExpansion==1) & isPowerProj==1) | /// No financing for new customers for new powerprojects
>                            (isMountaintopProj==1)))  // No financing for Mountaintop projects
{txt}(418 missing values generated)

{com}. 
. **** NAB* 
. gen ban_9227 = 1 if (year > 2017 & (isNew==1 & isThermal==1 & isMiningProj==1))  // No new thermal coal mines
{txt}(427 missing values generated)

{com}. 
. 
. ***** Natwest* 
. gen ban_11026 = 1 if (year >= 2018 & ((isNew==1 & isPowerProj==1) |                                                     ///New coal fired power stations
>                                 (isThermal==1 & isMiningProj==1 & isNew==1) |                                                   ///New thermal coal mines
>                                 (isMiningCo==1 & isThermal==1 & CoalFracRevParent > 0.4) |                      ///Mining companies generating more than 40% of their revenues from thermal coal
>                                 (isPowerCo==1 & CoalSharePowerParent>0.4)))                                             // Power companies generating more than 40% of their electricity from coal                 
{txt}(310 missing values generated)

{com}. 
. *** Nordea*   ---- QUESTION
. gen ban_9527 = 1 if (year > 2015 & (isNewCustomer==1 & (CoalFracRevParent == 1 | CoalSharePowerParent == 1))) //not to start new customer relationships with companies primarily dependent on coal
{txt}(335 missing values generated)

{com}. 
. ****Societe Generale*
. gen ban_11775 = 1 if (year > 2015 & ((isProjFin==1 & isMiningProj==1 & (isExpansion ==1 | isNew ==1)) | /// No project financing of development of coal mines
>                            (isPowerProj==1 & isProjFin==1 & (isNew==1 | isExpansion==1)) | ///& CountryGroup == "High Income OECD") | ///no longer be involved in project financing of coal-fired power plants in high income OECD countries
>                            (isMountaintopComp==1)))  // does not offer financial products and services to clients who are involved in Mountain Top Removal 
{txt}(260 missing values generated)

{com}. 
.                            
. 
. ***Standard Chartered* 
. gen ban_12093 = 1 if (year > 2018 & ((isNew==1 & isMiningProj==1 & isThermal==1)| /// New standalone non-captive thermal coal mining projects -- Date taken from Yann louvel
>                            ((isNew==1 | isExpansion==1) & isPowerProj==1 & isHighCarbonProj==1) | ///New coal-fired power plant projects in any location; Any coal-fired power plant expansions, retrofits or dedicated infrastructure, in any location
>                            (isMountaintopProj==1)))  // Mining operations that conduct Appalachian Mountaintop Removal
{txt}(356 missing values generated)

{com}. 
.                            
. 
. /*
> //DG's starting template for Coal Divestment policy coding.
> 
> Variables we will use to start in the policy definitions:
> (numbers in paranthesis indicates number of banks using this criteria)
> 
>         isProjFin:                                      = 1 for project finance
>         isCorpFin:                                      = 1 for corporate finance (3)
>         ContinentParent:                        {c -(}Africa, Asia, Europe, North America, South America, Australia{c )-} 
>         CountryParent:                          {c -(}any country name{c )-} Update: 9/15/2021 
>         
>         CoalFracRevParent:                      = fraction of revenue from coal of parent company
>         CoalSharePowerParent:           = coal share of power production of parent company
> 
>         isMiningCo:                                     = is company a mining company
>         isPowerCo:                                      = is company a power company
>         isMiningProj:                           = is project a mining project
>         isPowerProj:                            = is project a power project
> 
>         isNewCustomer                           = is the borrower a new customer?
> 
>         isLignite:                                      = is the project using lignite coal?
>         isThermal:                                      = is the project using thermal coal?
> 
>         isExpansion:                            = are proceeds used for expansion of capacity/life of coal assets?
>         isNew:                                          = are proceeds used for new coal ASSETS?
>         isLowCarbonProj:                        = are proceeds used for carbon transition / low carbon project
>         isMountaintopProj:                      = are proceeds used for mountaintop mining?
>         isMountaintopComp:                      = is company doing mountaintop mining? (6)
> 
>         hasDecarbonStrat:                       = Company has plan to decarbonize/diversify from carbon
>         
>         year:                                           = when is the financing happening
>         
>         CountryGroup                            = Option for group of countries in some
>                                                                   policies eg: OECD             
> */
. 
. * POLICY 1: XX BANK, YY YEAR
. *                       local path to pdf of policy document
. // use "temp", clear 
. // gen CountryGroup = " "
. //
. 
. 
. ***ABN AMRO
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ABN_AMRO_Exclusion_list.pdf
. gen ban_15000 = 1 if (year >= 2016 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1)) | isMountaintopProj==1)) 
{txt}(365 missing values generated)

{com}. 
. ** ABSA*
. * Policy Effective Date:
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\ABSA_coal-financing-standard.pdf
. gen ban_50 = 1 if (year >= 2020 & isNew == 1 & isPowerProj == 1) 
{txt}(407 missing values generated)

{com}. *carveouts if no reasonable cost alternative exists or if project is compliant with Equator Principles (EP)
. 
. 
. ***** Bank of America*
. gen ban_1869 = 1 if (((year >= 2021 & ((isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj==1) | /// Ban construction or expansion of new coal fired powerplants - unless they have a low carbon project.
>                                 (isMiningProj==1 & (isNew==1 | isExpansion==1)) |                                                               /// Ban new coal mines or expansion of existing coal mines
>                                 (isMountaintopComp==1))) | ///
>                                 (year >= 2025 & (isThermal==1 & isMiningCo==1 & CoalFracRevParent>0.25 & hasNoDecarbonStrat==1)))) // Starting 2025 will ban clients having more than 25% of revenue from thermal mining that do not have decarbonization strategy
{txt}(314 missing values generated)

{com}.         
. **** Barclays*
. gen ban_2263 = 1 if (((year >= 2019 & (isProjFin==1 & isPowerProj==1 & (isNew==1 | isExpansion==1) | /// No project finance to enable the construction or material expansion of coal-fired power stations anywhere in the world  
>                                 (isProjFin==1 & isMiningProj==1 & isThermal==1 & (isNew==1 | isExpansion==1)) | ///No project finance for the development of thermal coal mines anywhere in the world.
>                                 (isMountaintopProj==1))) | ///
>                                 (year>= 2020 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.5))) | ///From 2020 no financing to clients that generate more than 50% of revenue from thermal coal activities
>                                 (year >= 2025 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.3))) | /// 2025, no longer provide any financing to clients that generate more than 30% of revenue from thermal coal activities
>                                 (year >= 2030 & (isThermal==1 & (isMiningCo==1 | isPowerCo==1) & (CoalFracRevParent >0.1))))) //From 2020 no financing to clients that generate more than 10% of revenue from thermal coal activities
{txt}(306 missing values generated)

{com}. 
. 
. 
. **** BAYERN LB*
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Bayern_LB_sustainability_policy_2018.pdf
. gen ban_2311 = 1 if (year >= 2018 & (isMountaintopProj==1 )) //| isLignite==1))) 
{txt}(440 missing values generated)

{com}. * emphasis on banning lignite mining + power plants
. 
.     
. 
. **** Bendingo and Adelaide bank*
. gen ban_2351 = 1 if ((year >= 2014 & (isMiningCo==1 | isPowerCo==1))) // Do not lend to projects in the coal sector
{txt}(100 missing values generated)

{com}. 
. 
. **** BNP Paribas *
. gen ban_1106 =1 if ((year > 2020 & (((isNew==1 | isExpansion==1) & isPowerProj==1) | /// No finance for new or expansion of power projects
>                           (isNewCustomer==1 & CoalFracRevParent> 0.25 & hasNoDecarbonStrat==1))) | /// No finance for new customers with more than 25% of revenue from mining and has no Diversification strat
>                           (year >=2017 & ((isNew==1 & isPowerProj==1) | ///
>                           (isPowerCo==1 & isExpansion == 1)))) 
{txt}(306 missing values generated)

{com}.                         
. ***** BPCE*
. gen ban_1124 = 1 if (((year> 2015 & (isThermal==1 & isProjFin==1)) | ///
>                            (year > 2019 & (isThermal==1 & ((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent >0.25))))) | ///
>                            (year>=2020 & (isNew==1 &(isPowerCo==1 | isMiningCo==1))) // Natixis will halt its relationships with clients that develop new capacity in coal-powered electricity generation or thermal coal mining. (PROBLEM)
{txt}(272 missing values generated)

{com}. 
. ***** Caixabank* Talk about credit risk
. gen ban_2869 = 1 if ((year >= 2019 & ((isMiningProj==1 & (isNew==1 | isExpansion==1)) | ///No credit risk in new or expansion of mining projects 
>                            (isMountaintopProj==1) |                                                                     /// No credit risk for Montaintop Removal Projects
>                            (isMiningCo==1 & CoalFracRevParent > 0.4 & hasNoDecarbonStrat==1) | ///no credit risk in new long-term transactions or arrangements requested by mining companies with over 40% revenue from coal mining and no diversification strategy.  
>                            (isPowerProj==1 & (isExpansion==1 | isNew==1)) |                ///No credit risk in new or expansion of power projects  
>                            (isPowerCo==1 & CoalFracRevParent> 0.4 & hasNoDecarbonStrat==1)))) //no credit risk in new long-term transactions or arrangements requested by coal-power companies with over 40% revenue from coal mining and no diversification strategy.
{txt}(272 missing values generated)

{com}. 
. 
. **** Chiba bank* - 
. gen ban_3388 = 1 if (year >= 2020 & (isNew==1 & isPowerProj==1)) // if the support of the Government of Japan, international development organizations, etc. can be confirmed then will consider financing. 
{txt}(407 missing values generated)

{com}. 
. 
. **** CIMB* 
. gen ban_2737 = 1 if ((year > 2020 & ((isNew==1 & (isMiningProj==1 | isPowerProj==1) & hasNoDecarbonStrat==1) | /// No financing for new mining or powerprojects that do not have a decarbon strategy 
>                                 (isExpansion==1 & (isMiningProj==1 | isPowerProj==1))))) // No financing for expansion of mining or powerprojects that do not have a decarbon strategy 
{txt}(320 missing values generated)

{com}. 
. 
. ** Citi*
. gen ban_3536 = 1 if ((year >= 2021 & (( isThermal==1 & isProjFin==1 & (isNew==1|isExpansion==1) & isMiningProj==1) | /// New thermal coal mines or significant expansion of existing mines;
>                                          (isProjFin==1 & (isNew==1|isExpansion==1) & isPowerProj==1) | ///New coal-fired power plants or expansion of existing plants
>                                          (isMiningCo==1 & isThermal==1 & CoalFracRevParent >= 0.25) | ///targets to phase out our financing of mining companies deriving ≥25% of their revenue from thermal coal mining
>                                          (isPowerCo==1 & isHighCarbonProj == 1) | ///
>                                          (isNewCustomer==1 & (CoalSharePowerParent >= .2 & isHighCarbonProj==1) | ///Not onboard any new clients with ≥20%,
>                                          (isNewCustomer==1 & isExpansion==1)))) | /// Not onboard any new clients that have plans to expand coal-fired power generation
>                                          (year > 2025  & ((isPowerCo & CoalFracRevParent >= 0.05 & isNewCustomer == 1) | ///
>                                          (isMiningCo & isCorpFin))) | ///
>                                          (year > 2030 & ((isPowerCo & CoalFracRevParent>= 0.05 & CountryGroup == "OECD") | ///
>                                          (isMiningCo))) | ///
>                                          (year >=2015 & isMiningCo==1 & CoalFracRevParent >= 0.5))
{txt}(240 missing values generated)

{com}.                                         
. 
. 
. ***** Commerzbank*
. gen ban_3731 = 1 if (((year >= 2020 & ((isNew ==1 & (isMiningProj==1 | isPowerProj==1)) | ///No financing for new mining projects
>                                 (isMountaintopComp==1))) | ///No Financing for mountaintop companies
>                                 (year>2021 & ((isPowerCo==1 & CoalSharePowerParent > 0.30 & CountryParent == "Germany") | ///German clients from the energy supply sector to limit the share of electricity generated from coal (based on their production performance) to below 30 per cent bythe end of 2021
>                                 (isPowerCo==1 & CoalSharePowerParent>0.5))) | /// For ROW 
>                                 (year > 2016 & ((isNewCustomer==1 & isPowerCo==1 & CoalSharePowerParent> 0.3 & CountryParent == "Germany") | /// For new clients, the above is enacted since 2016
>                                 (isNewCustomer==1 & isPowerCo==1 & CoalSharePowerParent>0.5)))))
{txt}(345 missing values generated)

{com}.                 
. 
. *** CommonwealthBank
. * No defined criteria for exclusions
. 
. 
. **** Concordia- Unknown year and Synthetic_Bank_ID
. // gen ban = 1 if (isNew==1 & isPowerProj==1 & isHighCarbonProj==1) 
. 
. 
. **** CPEG, documents in french. No loans in our datasets
. 
. 
. 
. */
. 
. 
.                                 
. 
. *** Dai_ichi Life *
. gen ban_4128 = 1 if ((year > 2019 & (isPowerProj==1))) // general excercise to refrain from lending financial support to coal power projects
{txt}(330 missing values generated)

{com}. 
. 
. **** Danske Bank*
. gen ban_4176 = 1 if ((year >2021 & ((isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.05) |  /// No financing for thermal coal mines with revenue > 0.05
>                            (isPowerCo==1 & CoalFracRevParent> 0.05)))) //No financing for coal power companies with revenue > 0.05
{txt}(323 missing values generated)

{com}.                 
. **** DBS*
. gen ban_4309 =1 if ((year > 2020 & ((isNew==1 & isPowerProj==1) | /// No financing on new coal-fired power plants
>                           (hasNoDecarbonStrat==1) | /// Only support customers with a diversification strategy
>                           (isNew==1 & isProjFin==1 & isThermal==1 & isMiningProj==1) | /// Stopping project financing of greenfield thermal coal mines
>                           (isThermal==1 & isMiningCo==1 & CoalFracRevParent == 1.00)))) // Stopping financing of pure play thermal coal mining, processing, trading, construction and operation of thermal coal power plants 
{txt}(240 missing values generated)

{com}. 
. **** Deka* 
. gen ban_4229 = 1 if ((year > 2019 & ((isNew==1 | isExpansion==1) & isPowerProj==1))) // Development, construction and operation of coal-fired power plants
{txt}(374 missing values generated)

{com}. 
. **** Desjardins*
. gen ban_2683 = 1 if ((year > 2020 & ((isMiningCo==1) | /// Operate or develop coal mines
>                            (isPowerCo ==1 & CoalSharePowerParent>0.1) | /// Have greater than 10%, or 5 GW, installed coal power generation capacity
>                            ((isNew==1 | isExpansion==1) & isPowerCo==1)))) // Are building, extending or renovating coal mines, power plants or infrastructure.
{txt}(250 missing values generated)

{com}.                            
. **** Deutsche Bank*
. gen ban_4293 = 1 if (((year > 2016 & (isPowerProj==1 & (isNew==1 | isExpansion==1))) | ///
>                            (year > 2020 & ((isMountaintopProj==1 & CountryParent == "USA") | /// No financing for MTR projects in the USA
>                            (isPowerCo==1 & CoalFracRevParent > 0.5 & hasNoDecarbonStrat==1 & ContinentParent != "Asia") | /// Not provide finances for companies with more than 50% revenue and not have decarbonization strategy. 2020 for all continents except for Asia.
>                            (isMiningProj==1 & isThermal==1 & isNew==1)))  | ///not provide any financing for greenfield thermal coal mining
>                            (year>=2022 & isPowerCo==1 & CoalFracRevParent > 0.5 & hasNoDecarbonStrat==1 & ContinentParent == "Asia"))) // 2022 for asia
{txt}(336 missing values generated)

{com}. 
. **** DNB*
. gen ban_4100 = 1 if ((year > 2016 & ((isProjFin==1 & isPowerProj==1) | /// No project Finance for coal fired power plant
>                                 (isNew==1 & isPowerCo==1 & CoalFracRevParent > 0.3)))) // New customers with more than 30% share of rev from coal fired power plants
{txt}(356 missing values generated)

{com}.                                                                                         
. ***** DZ Bank*
. gen ban_4107 = 1 if (((year > 2017 & (isProjFin==1 & isPowerProj==1)) | ///
>                            (year > 2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No financing of new or existing coal-fired power plants
>                            (isMiningCo==1 & isThermal==1) |  ///No financing of activities upstream in the value chain for thermal coal, especially mining, trade and directly related activities
>                            (hasNoDecarbonStrat==1))))) // No indirect financing of companies with an increased share of coal if no will to transform is evident or if the use of funds for coal can be ruled out
{txt}(222 missing values generated)

{com}.                            
. **** E.Sun*
. gen ban_4462 = 1 if ((year > 2019 & (isPowerProj==1 & (isNew==1 | isExpansion==1))))
{txt}(374 missing values generated)

{com}. 
. 
. **** Erste Group*
. gen ban_1261 = 1 if (((year >= 2021 & ((isMiningProj==1 |isPowerProj==1) & (isNew==1 | isExpansion==1) | ///Direct financing of coal-asset specific investments or cash flows related to coal mining, coal processing, coke processing or coal based power generation
>                         (isCorpFin==1 & isExpansion==1 & (isMiningCo==1 | isPowerCo==1)) | /// Corporate financing for companies or group of companies which extend their coal mining or coalbased power generation (installed) capacities
>                         (isCorpFin==1 & ((isMiningCo==1 & CoalFracRevParent>0.25 ) | (isPowerCo==1 & CoalFracRevParent>0.25))))) |  ///Corporate financing for companies or group of companies which have more than 25% of revenues coming from coal sector
>                         (year > 2023 & hasNoDecarbonStrat==1 & isCorpFin==1))) //Corporate financing for companies or group of companies which do not set up until end of 2023 a transition plan aligned with the 2030 phase out target
{txt}(258 missing values generated)

{com}. 
. **** Goldman Sachs* -- Date from Yann louvel reclaim finance
. * PATH TO POLICY PDF: \Dropbox\coal_finance\Divestment docs\Goldman_Sachs_2020.pdf
. gen ban_5853 = 1 if ((year > 2019 & ((isNew==1 & isPowerProj==1 & isHighCarbonProj==1) | /// No financing for new coal power plants that do not have low carbon policies
>                                 (isNew==1 & isMiningProj==1) |                                                                  /// No financing for new thermal coal mine
>                                 ((isNew==1 | isExpansion==1) & isMountaintopProj==1))))                                 // No Financing for MTR projects 
{txt}(385 missing values generated)

{com}.   
. **** Handelsbanken* 
. gen ban_6253 = 1 if ((year > 2019 & ((isMiningProj==1 | isPowerCo==1) & (isNew==1 | isExpansion==1) | /// No financing for new or developing Coal power plants or mines
>                            (isNewCustomer==1 & !hasNoDecarbonStrat==1)))) // Not deelop relations with clients active in coal sector and do not have a transition policy
{txt}(308 missing values generated)

{com}.         
. **** Hannoversche Beteiligungsgesellschaft- Synthetic_Bank_ID not known. No transactions.
. //gen ban_XX = 1 if ((year > 2019 & (isPowerProj))) ///Financing the construction of conventional coal-fired power plants.
. 
.            
. ****HSBC* 
. gen ban_6184 = 1 if (((year >= 2020 & (((isNew==1 |isExpansion==1) & isMiningProj==1) |                 /// No Financing for New or expansion of existing mining projects
>                         (isNewCustomer==1 & isMiningCo==1 & CoalFracRevParent > 0.5) |          /// Not take any new customers dependent (>50% of coal revenue) from coal
>                         (isMountaintopComp==1 & CountryParent == "USA") |                                       /// No finance for MTR firms in the USA
>                         (isMountaintopProj==1 & isMiningProj==1) |                                                      /// No finance for Mountaintop mines 
>                         ((isNew==1 | isExpansion==1) & isPowerProj==1 & isHighCarbonProj==1))) | ///
>                         (year >=2018 & (isNew==1 & isPowerProj==1 & (CountryParent != "Bangladesh" | CountryParent != "Indonesia" | CountryParent != "Vietnam")))))              // Banning finance for new or expanding power plants without a low carbon policy
{txt}(291 missing values generated)

{com}.         
.                                                                         
.                    
. **** Intessa San Paolo* --- Date from Yann louvel excel file 
. gen ban_1317 = 1 if ((year >= 2020 & ((isNew==1 & isMiningProj==1) | ///
>                            (isMiningCo==1 & isMountaintopComp==1) | ///
>                            isPowerCo==1 & ((CoalSharePowerParent > 0.5 & CountryGroup == "Non-OECD") | (CoalSharePowerParent > 0.3 & CountryGroup == "OECD")))))
{txt}(363 missing values generated)

{com}. 
.                            
. **** Investec* 
. gen ban_7072 = 1 if ((year >=2020 & ((isMountaintopProj==1) | ///We will not finance mountaintop removal mining activities
>                            (isPowerProj==1 & isHighCarbonProj==1) |   ///Investec will not provide funding to new build of conventional plants*.
>                            (isExpansion==1 & hasNoDecarbonStrat==1))))   // not for expansion purposes unless it meets the required efficiency criteria  
{txt}(286 missing values generated)

{com}. 
. **** JPMorgan*
. gen ban_6179 = 1 if ((year >=2020 & ((isProjFin==1 & isNew==1 & isMiningProj==1) | /// No Project finance to develop new mines
>                            (isMiningCo==1 & CoalFracRevParent > .5) | ///Not provide lending, capital markets or advisory services to companies deriving the majority of their revenues from the extraction of coal
>                            (isMiningProj==1) | /// NO mountaintop projects
>                            (isPowerProj==1 & isProjFin==1 & isHighCarbonProj==1)))) | ///not provide project financing or other forms of asset-specific financing where the proceeds will be used to develop a new coal-fired power plant or refinance an existing coal-fired power plant
>                            ((year >= 2024 & isCorpFin == 1 & isMiningCo))
{txt}(264 missing values generated)

{com}.                            
.                            
. **** KB Financial* -- Date from Yann louvel excel file
. gen ban_7434 = 1 if ((year >2020 & (isProjFin==1 & isPowerProj==1 & isNew==1))) // Suspension of new project financing and bond underwriting for domestic and overseas coal-fired power plant construction
{txt}(410 missing values generated)

{com}. 
. 
. **** Kiwibank*
. gen ban_9432 = 1 if (year >= 2020 & (isMiningCo==1)) // banking services to entities that are directly involved in, or where the majority of their business revenue is from
{txt}(330 missing values generated)

{com}. 
. 
. **** Lloyds Banking Group*
. gen ban_8286 =1 if ((year >= 2019 & ((isNew==1 & isPowerProj==1) | ///
>                            (isThermal==1 & isNew==1 & isMiningProj==1) | ///
>                            (isNewCustomer==1 & ((isMiningCo==1|isPowerCo==1) & CoalFracRevParent > 0.5)))))     // The Bank will not bank new clients where most of their revenue is  derived from coal-fired power stations or thermal coal mines                 
{txt}(332 missing values generated)

{com}.                 
. 
. **** mBank*
. gen ban_13818 = 1 if ((year>=2019 & (isNew==1 & (isMiningProj==1 | isPowerProj==1) | /// No financing for New mining or power projects
>                                 (isNewCustomer==1 & CoalSharePowerParent > 0.5)))) // Not engage with new clients with more than 50% in power generation capacity from coal
{txt}(320 missing values generated)

{com}.                                 
. 
. 
. 
. **** Morgan Stanley*
. gen ban_9031 = 1 if ((year >2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1) & isHighCarbonProj==1) | ///We will not finance transactions globally that directly support the development of new or physical expansions of coal-fired power generation
>                                          (isMountaintopProj==1 & isMiningCo ==1) | ///
>                                          (isNew==1 & isThermal==1 & isMiningProj == 1))))
{txt}(370 missing values generated)

{com}. 
. ***** MUFG*
. gen ban_8917 = 1 if ((year >= 2020 & ((isNew==1 & isPowerProj==1) | ///MUFG will not provide financing to new coal fired power generation project
>                            (isMountaintopProj==1)))) //We will not provide any financing to coal mining projects using the mountaintop removal
{txt}(407 missing values generated)

{com}.                            
. 
. 
. **** NBS* -- Date taken from Yann Louvel reclaim finance
. gen ban_9374 = 1 if ((year >= 2019 & ((isPowerProj==1 & isNew==1) | ///Not provide financing to any new coal-fired power stations regardless of technology or jurisdiction
>                            (isMiningProj==1 & isNew==1 & isThermal==1 & CountryParent != "South Africa") | ///Not provide financing to thermal coal mines outside of South Africa
>                            (isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.4)))) //Thermal coal mining company relates to mining companies that derive more than 40% of their revenue from thermal coal mining
{txt}(356 missing values generated)

{com}.                                 
. *** Nippon Life* -- Adopted from Yanna Louvel
. gen ban_9480 = 1 if ((year > 2018 & (isNew==1 & isPowerProj==1))) // not to engage in new investment and financing in coal-fired power generation projects anywhere in Japan or overseas.
{txt}(404 missing values generated)

{com}. 
. 
. **** Norinchukin*
. gen ban_9543 =1 if(( year > 2019 & (isPowerProj==1 & isNew==1))) // NO financing for new power projects
{txt}(407 missing values generated)

{com}. 
. 
. **** OCBC*
. gen ban_9943 = 1 if ((year >= 2019 & (isPowerProj==1 & isNew==1))) // NO financing for new power projects
{txt}(404 missing values generated)

{com}. 
. ***PKO BP* 
. gen ban_10009 = 1 if ((year >= 2019 & (isMiningProj==1 & isNew==1))) // NO financing for new mining projects
{txt}(416 missing values generated)

{com}. 
. ***PNC* -- Date taken from Yann louvel 
. gen ban_10016 = 1 if ((year > 2017 & (isNewCustomer==1))) // How to do this---->more than a de minimis exposure to mountaintop removal mining?
{txt}(323 missing values generated)

{com}. 
. ***Rabobank* -- Date taken from yann louvel excel file
. gen ban_10773 = 1 if ((year >= 2017 & (isPowerCo==1 | isMiningCo==1)))
{txt}(160 missing values generated)

{com}. /*
> • directly finance the exploration, extraction or production of coal used for
> power generation, shale gas, tar sands and other nonconventional fossil
> natural resources, nor the transport up to the production unit, production,
> processing, or refining of these extractive industries products;
> • directly finance coal-fired power generation;
> • directly finance the trade of coal for power generation. We may directly
> finance the trade of higher grade metallurgical coals used for the
> production of steel and base metals only;
> • finance companies that realize more than 20% of their turnover in trading
> coal used for power generation.
> */
. 
. ***Raiffeisen*
. gen ban_10781 = 1 if ((year >= 2019 & ((isNew==1 & isThermal==1 & isMiningProj==1) | ///
>                                 (isNewCustomer==1 & isThermal==1 & isMiningCo==1)| ///
>                                 (isThermal==1 & isMiningCo==1)))) //customers in the thermal coal mining sector or companies where more than 50 percent of the revenue is generated from thermal coal trading.
{txt}(368 missing values generated)

{com}. 
. ***RBC*
. gen ban_10727 = 1 if ((year > 2020 & ((isNew==1 & isThermal==1 & isMiningProj==1) | ///
>                                 (isMountaintopProj==1) | /// new greenfield coal-fired power plant, thermal coal mine or Mountain Top Removal coal mining projects.
>                                 (isNewCustomer==1 & ((isThermal==1 & isMiningCo==1 & CoalFracRevParent > 0.6) | (isPowerCo==1 & CoalSharePowerParent> 0.6)) & hasNoDecarbonStrat==1))))                         //will not provide financing to new clients that operate significant thermal coal mining (>60% revenue) or coal power generation assets (>60% generation, Megawatt hour (MwH).
{txt}(380 missing values generated)

{com}.                          
.                                 
. ***Resona Holdings*
. gen ban_10909 = 1 if ((year >= 2019 & ((isProjFin==1 & isNew==1 & isThermal==1 & isPowerProj==1))))
{txt}(404 missing values generated)

{com}. 
. ***Rothschild & co*
. gen ban_9146 = 1 if ((year >= 2020 & ((isThermal==1) | ///
>                                 (isThermal==1 & isMiningProj==1 & isNew==1)| ///
>                                 (isNew==1 & isPowerProj==1)))) // not provide financing or financing advisory in relation to new thermal coal mining projects, new thermal coal developments or new coal-fired power generation assets
{txt}(264 missing values generated)

{com}. 
. 
. ***Samsung* -- From the Yann Louvel Excel file as link is empty
. gen ban_11256 = 1 if ((year > 2020 & isNew==1))
{txt}(390 missing values generated)

{com}. 
. ****Santander*
. gen ban_1527 = 1 if ((year >= 2020 & ((isNew==1 & isPowerProj==1)| ///New coal-fired Power Plants projects worldwide.
>                                 (isNewCustomer==1 & isPowerCo==1) | ///New clients with coal-fired power plants worldwide.
>                                 (isPowerProj==1 & isHighCarbonProj==1)))) //For existing clients: Transactions specific to coal power plants are allowed only when they improve significantly environmental impacts
{txt}(330 missing values generated)

{com}. 
. ****SEB* --- From Yann Louvel Excel File
. gen ban_11100 = 1 if ((year > 2015 & ((isNewCustomer==1 & isMiningCo==1 & CoalFracRevParent > 0.5) |  ////Exclusion of companies with major business in coal mining for new clients.
>                                 (isPowerProj==1)))) //Ending financing for coal power projects worldwide.
{txt}(230 missing values generated)

{com}. 
. ***Shinhan* -- Exact carbon emission listed, should we use isLowCarbonProj? -- Date from Yann Louvel excel file
. gen ban_11616 = 1 if ((year>2020 & isProjFin==1 & isHighCarbonProj==1 & CountryGroup == "OECD"))
{txt}(330 missing values generated)

{com}.  
. ****Shinsei Bank*
. gen ban_11628 = 1 if ((year >= 2020 & ((isThermal==1 & isPowerProj==1)))) //new investment and lending to coal-fired thermal power plants will not be provided either in Japan or overseas, in principle, based on a preventive approach
{txt}(330 missing values generated)

{com}. 
. 
.                            
. //  Sparkassen- und Giroverband Hessen-Thüringen (Helaba)* 
. gen ban_8081  = 1 if ((year > 2020 & ((isPowerProj==1 & (isNew==1 | isExpansion==1)) | ///No financing for projects involving the construction of new coal-fired power plants or for expanding the capacity of existing coal-fired power plants
>                            (isNewCustomer==1 & (isMiningCo==1 | isPowerCo==1)) | /// No financing of new corporate clients whose business predominantly involves coal-based energy (coal mining or coal-fired power plants)
>                            (isMiningProj==1 & (isNew==1 | isExpansion==1)) | /// No financing of projects directly related to the mining of power plant coal, including process chains directly and exclusively associated
>                            (isMountaintopProj==1) | ///No financing of projects in connection with mountaintop removal mining
>                            (isPowerCo==1 & CoalFracRevParent>0.25))))
{txt}(280 missing values generated)

{com}.                 
. 
. ***Standard Bank*
. gen ban_12090 = 1 if ((year >= 2019 & (isNew==1 & isPowerProj==1 & isHighCarbonProj == 1 ))) //& CountryGroup != "IDA"))) /// IDA - Overseen by 173 shareholder nations, IDA aims to reduce poverty by providing loans (called "credits") and grants for programs that boost economic growth, reduce inequalities, and improve people's living conditions. IDA lends money on concessional terms.
{txt}(404 missing values generated)

{com}. 
. 
. ****Sumitomo Mitsui Financial Group* -- Date taken from Yann louvel
. gen ban_12295 = 1 if ((year >2020 & (((isNew==1 | isExpansion==1) & isPowerProj==1)| ///
>                            (isMountaintopProj==1)))) // Support for newly planned coal-fired power plants and the expansion of existing plants are not provided
{txt}(380 missing values generated)

{com}. 
. ****Sumitomo Mitsui Trust Holdings* -- Date taken from Yann louvel
. gen ban_12296 = 1 if ((year >= 2019 & (isNew==1 & isPowerProj==1) & isProjFin == 1)) // SuMi TRUST Bank has decided, in principle, not to engage in new projects for the construction of coal-fired power plants
{txt}(404 missing values generated)

{com}. 
. ***Swedbank*
. gen ban_12367 = 1 if ((year > 2018 & ((((isMiningCo==1 | isPowerCo==1) & CoalFracRevParent>0.05))|  /// We will not provide financial services to companies mining and producing coal to more than 5% of its revenue
>                             (isNew==1 & isPowerProj==1)))) // We will not directly finance coal-fired power production or the establishment of new coal-fired power plants
{txt}(260 missing values generated)

{com}.                                  
. *****TD* (unkonwn year WaybackMachine suggests 2017, Page source code says 2020)
. gen ban_12752 = 1 if year > 2020 & (isMountaintopProj==1 & isMiningProj==1)
{txt}(440 missing values generated)

{com}. 
. ***Toho*
. gen ban_12684 = 1 if ((year >= 2020 & (isNew==1 & isPowerProj==1)))
{txt}(407 missing values generated)

{com}. 
. ****UBS*
. gen ban_12925 = 1 if ((year > 2020 & ((isNew==1 & isPowerProj==1)| ///Not providing project-level finance to new coal-fired power plants globally
>                        (isPowerCo==1 & CoalSharePowerParent>0.3 & hasNoDecarbonStrat==1 & isHighCarbonProj==1) | ///Only supporting financing to transactions of existing coal-fired operators (>30% coal reliance)who have a transition strategy in place, or if the transaction is related to renewable energy
>                            (isMiningProj==1 & isThermal==1 & (isNew==1 | isExpansion==1))| ///Not providing financing where the stated use of proceeds is for greenfield1 thermal coal mines
>                            (isMountaintopComp==1)))) //Not providing financing to coal-mining companies engaged in MTR operations
{txt}(350 missing values generated)

{com}. 
. ***Unicredit* 
. gen ban_9042 = 1 if ((year > 2020 & ((isProjFin==1) | ///
>                            (isExpansion == 1) | /// No Project finance or Expansion finances
>                            ((isMiningCo == 1|isPowerCo== 1) & CoalFracRevParent > 0.25 & hasNoDecarbonStrat == 1)))) // No financing for companies above 25% of revenue from coal unless they have a plan to exit by 2030
{txt}(300 missing values generated)

{com}. 
. ****United Overseas Bank (UOB)* 
. gen ban_13101 = 1 if ((year >= 2019 & ((isNew==1 & isPowerProj==1) | ///
>                            (isProjFin==1 & isMiningProj==1 & isNew==1 & isThermal==1)) )) //Discontinued new financing of coal-fired power plant projects and prohibited the project financing of greenfield thermal coal mines
{txt}(392 missing values generated)

{com}. 
. ****US Bancorp*
. gen ban_12946 = 1 if ((year > 2021 & ((isMountaintopProj==1) | /// No participation in Mountaintop projects
>                            (isProjFin==1 & isNew==1 & isMiningProj==1) | /// we will not participate in any relationship involving or provide project financing or other forms of asset-specific financing for the development of new coal mines.
>                            (isPowerProj==1 & isProjFin==1 & (isNew==1 | isExpansion==1))))) //direct project financing of coal-fired power plants and relationships that involve constructing such plants.
{txt}(368 missing values generated)

{com}.                            
. ***Wells Fargo*-- Date from Yann Louvel Excel file 
. gen ban_13490 = 1 if( (year > 2015 & (isMountaintopProj==1)))
{txt}(440 missing values generated)

{com}. 
. 
. ****Westpac -- Link not found* -- Date from Yann Louvel Excel file 
. gen ban_13563 =1 if ((year >= 2017 & ((isThermal==1 & isNew == 1 & isMiningProj==1) | (isPowerProj==1))))
{txt}(286 missing values generated)

{com}. /*
> •     Ending direct finance for new thermal coal mines projects in new coal producing basins or where the calorific value is not in the top 15% globally.
> •     Exclusion of coal mining companies that have a calorific value which  &does not rank in the top quartile globally.
> •     Ending direct finance for new coal power generation where it does not reduce the emissions intensity of the grid in which the generator operates.
> 
> ***Zurcher Kantonalbank 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
{txt}
{com}. //get rid of extra secenarios used for graph
. drop if scenario > 100
{txt}(132 observations deleted)

{com}. 
. count if year == 2009
  {res}14
{txt}
{com}. local scenario_count = r(N)
{txt}
{com}. gcollapse (sum) ban_*, by(year)
{res}{txt}{res}{txt}{res}{txt}
{com}. greshape long ban_ , i(year) j(BankID)
{res}{txt}(note: j = 50 967 981 1043 1106 1124 1261 1317 1527 1869 2263 2311 2351 2683 2726 2737 2869 3388 3536 3731 3966 4100 4107 4128 4176 4229 4293 4309 4462 5853 6179 6184 6253 6757 7072 7434 7439 8081 8286 8917 8939 9031 9042 9146 9227 9374 9432 9480 9527 9543 9943 10009 10016 10727 10773 10781 10909 11026 11100 11256 11616 11628 11775 12090 12093 12295 12296 12367 12684 12752 12925 12946 13101 13490 13563 13818 15000)
{res}(note: cannot preserve labels when reshaping long)
{txt}{res}{txt}
Data{col 36}wide{col 43}->{col 48}long
{hline 77}
Number of obs.{col 19}{res}                   22{txt}{col 43}->   {res}1,694                
{txt}Number of variables{col 19}{res}                   78{txt}{col 43}->   {res}3                    
{txt}j (77 values)         {col 43}->{col 48}{res}BankID
{txt}xij variables:
           {res}ban_50 ban_967 ... ban_15000{col 43}{txt}->{res}{col 48}ban_
{txt}{hline 77}
{res}{txt}
{com}. rename ban_ banned_scenario_count
{res}{txt}
{com}. gen ban_intensity_initial = banned_scenario_count/`scenario_count'
{txt}
{com}. keep BankID year ban_intensity_initial
{txt}
{com}. tempfile non_updating
{txt}
{com}. save `non_updating'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000e{rm}
saved
as .dta format
{p_end}

{com}. 
. use ../Intermediate/policy_intensity_yearly_new, clear
{txt}
{com}. merge 1:1 BankID year using `non_updating', nogen 
{res}{txt}{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:BankID} was {bf:int}, now {bf:long} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           1,694{txt}  
{col 5}{hline 41}

{com}. compress
  {txt}variable {bf}{res}BankID{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
{txt}  (6,776 bytes saved)

{com}. save ../Intermediate/policy_intensity_yearly_new, replace
{txt}{p 0 4 2}
file {bf}
../Intermediate/policy_intensity_yearly_new.dta{rm}
saved
{p_end}

{com}. 
. {txt}
{com}. 
. ***********************************************************************
. ** COMBINE STUFF INTO A BAN STRENGTH DATASET 
. ***********************************************************************
. use ../Raw/Bank_Sample/BankSample_List, clear 
{txt}
{com}. 
. recast str80 BankName, force
{txt}BankName:  {res}3{txt} values changed

{com}. merge m:1 BankName using ../Intermediate/policy_strength_reclaim.dta, keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          13,501
{txt}{col 9}from master{col 30}{res}          13,501{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             144{txt}  
{col 5}{hline 41}

{com}. merge m:1 BankName using ../Intermediate/sbti_clean.dta, nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          13,578
{txt}{col 9}from master{col 30}{res}          13,577{txt}  
{col 9}from using{col 30}{res}               1{txt}  

{col 5}Matched{col 30}{res}              68{txt}  
{col 5}{hline 41}

{com}. merge 1:m BankID using ../Intermediate/policy_sensitivities_yearly, keep(3) nogen 
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:float}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}         300,190{txt}  
{col 5}{hline 41}

{com}. merge 1:1 BankID year using ../Intermediate/policy_sensitivities_yearly_initial, keep(3) nogen 
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}         300,190{txt}  
{col 5}{hline 41}

{com}. merge 1:1 BankID year using ../Intermediate/policy_intensity_yearly, keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}         298,518{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}           1,672{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen has_coded_policy = _merge == 3
{txt}
{com}. drop _merge
{txt}
{com}. 
. 
. merge 1:1 BankID year using ../Intermediate/policy_intensity_yearly_new, keep(1 3) 
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         298,518
{txt}{col 9}from master{col 30}{res}         298,518{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}           1,672{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen has_coded_policy_new1 = _merge == 3
{txt}
{com}. drop _merge
{txt}
{com}. 
. gen sbti_panel=(year_sbti>=year & !missing(year_sbti))
{txt}
{com}. 
. gen ba15_panel=sbti_panel*ba15_d
{txt}(298,694 missing values generated)

{com}. replace ba15_panel=0 if missing(ba15_panel)
{txt}(298,694 real changes made)

{com}. gen netzero_panel=sbti_panel*netzero_d
{txt}(298,694 missing values generated)

{com}. replace netzero_panel=0 if missing(netzero_panel)
{txt}(298,694 real changes made)

{com}. 
. 
. //get first year the bank has a policy with ANY bite
. gen fy = year if ban_intensity > 0   
{txt}(771 missing values generated)

{com}. egen first_ban_year = min(fy), by(BankID) 
{txt}(22 missing values generated)

{com}. drop fy  
{txt}
{com}. replace first_ban_year = . if has_coded_policy == 0  
{txt}(298,518 real changes made, 298,518 to missing)

{com}. gen active_policy = year >= first_ban_year
{txt}
{com}. 
. gen fy = year if ban_intensity_new1 > 0   
{txt}(800 missing values generated)

{com}. egen first_ban_year_new1 = min(fy), by(BankID) 
{txt}(66 missing values generated)

{com}. drop fy  
{txt}
{com}. replace first_ban_year_new1 = . if has_coded_policy_new1 == 0  
{txt}(298,518 real changes made, 298,518 to missing)

{com}. gen active_policy_new1 = year >= first_ban_year_new1
{txt}
{com}. compress
  {txt}variable {bf}{res}n_ijg_trans{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}date_sbti{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}year_sbti{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}ba15_d{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}netzero_d{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}targetset{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}is_sens_isNew{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isExpansion{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isMiningProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isPowerProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isMountaintopProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isMountaintopComp{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isHighCarbonProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isNewCustomer{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isProjFin{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isThermal{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_hasNoDecarbonStrat{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isMiningCo{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isPowerCo{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_isCorpFin{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_CoalFracRevParent{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_sens_CoalSharePowerParent{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isNew{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isExpansion{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isMiningProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isPowerProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isMountaintopProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isMountaintopComp{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isHighCarbonProj{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isNewCustomer{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isProjFin{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isThermal{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_hasNoDecarbonStrat{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isMiningCo{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isPowerCo{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_isCorpFin{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_CoalFracRevParent{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}i_is_sens_CoalSharePowerParent{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_coded_policy{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_coded_policy_new1{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}sbti_panel{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}ba15_panel{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}netzero_panel{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}first_ban_year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}active_policy{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}first_ban_year_new1{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}active_policy_new1{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}BankID{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}n_ds_trans{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}long{sf}
  {txt}variable {bf}{res}isin{sf}{txt} was {bf}{res}str37{sf}{txt} now {bf}{res}str12{sf}
{txt}  (51,932,870 bytes saved)

{com}. 
. egen reclaim_max=rowmax(developers projects relativethreshold phaseout absolutethreshold)
{txt}(297,022 missing values generated)

{com}. egen reclaim_average=rowtotal(developers projects relativethreshold phaseout absolutethreshold)
{txt}
{com}. replace reclaim_average=reclaim_average/5
{txt}(2,200 real changes made)

{com}. 
. 
. **build time-varying reclaim indices
. gen rf_max=active_policy*reclaim_max
{txt}(297,022 missing values generated)

{com}. gen rf_average=active_policy*reclaim_average
{txt}
{com}. gen rf_phaseout = active_policy*phaseout 
{txt}(297,110 missing values generated)

{com}. gen rf_dev = active_policy*developers 
{txt}(297,044 missing values generated)

{com}. gen rf_proj = active_policy*projects
{txt}(297,044 missing values generated)

{com}. egen n_intensity = nvals(ban_intensity), by(BankID)
{txt}(298,518 missing values generated)

{com}. replace n_intensity = n_intensity - 1 
{txt}(1,672 real changes made)

{com}. bys BankID: gen firstB = _n == 1
{txt}
{com}. tab n_intensity if firstB == 1

{txt}n_intensity {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}          1        1.32        1.32
{txt}          1 {c |}{res}         51       67.11       68.42
{txt}          2 {c |}{res}         16       21.05       89.47
{txt}          3 {c |}{res}          6        7.89       97.37
{txt}          4 {c |}{res}          2        2.63      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         76      100.00
{txt}
{com}. drop firstB
{txt}
{com}. 
. gen phaseup_ap = active_policy*n_intensity
{txt}(298,518 missing values generated)

{com}. 
. save ../Intermediate/bank_ban_strength_yearly, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_ban_strength_yearly.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_ban_strength_yearly.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. 
. 
. {txt}
{com}. 
. **************************************************************************
. ******* BUILD COAL PLANT PLANNING DATA
. **************************************************************************
. //These samples come from the EIA Coal Generator Data and Beyond Coal Europe
. include "../Data_Cleaning/Build_EIA_Generator.do" //USA
{txt}
{com}. 
. 
. 
. ********************************************************************************
. * EIA Coal Generator Level Data
. ********************************************************************************
. 
. *Retired Generator Data
. drop _all
{txt}
{com}. tempfile cumulator
{txt}
{com}. quietly save `cumulator', emptyok
{txt}
{com}. forval year=2014(1)2022{c -(}
{txt}  2{com}.         if `year' == 2014 {c -(}
{txt}  3{com}.                 import excel "../Raw/EIA/EIA_Coal_Plant_Data/existing_gen_units_`year'.xls", clear firstrow cellrange(A2) sheet("Retired and Canceled")
{txt}  4{com}.                 gen year = `year'
{txt}  5{com}.                 append using `cumulator'
{txt}  6{com}.                 quietly save `cumulator', replace
{txt}  7{com}.         {c )-}
{txt}  8{com}.         if `year' > 2014 & `year' <= 2020 {c -(}
{txt}  9{com}.                 import excel "../Raw/EIA/EIA_Coal_Plant_Data/existing_gen_units_`year'.xlsx", clear firstrow cellrange(A2) sheet("Retired and Canceled")
{txt} 10{com}.                 gen year = `year'
{txt} 11{com}.                 append using `cumulator'
{txt} 12{com}.                 quietly save `cumulator', replace
{txt} 13{com}.         {c )-}
{txt} 14{com}.         if `year' > 2020 {c -(}
{txt} 15{com}.                 import excel "../Raw/EIA/EIA_Coal_Plant_Data/Coal Generators `year'.xlsx", clear firstrow cellrange(A2) sheet("Retired and Canceled")
{txt} 16{com}.                 gen year = `year'
{txt} 17{com}.                 destring UtilityID, replace force
{txt} 18{com}.                 append using `cumulator'
{txt} 19{com}.                 quietly save `cumulator', replace
{txt} 20{com}.         {c )-}
{txt} 21{com}. {c )-}
{res}{text}(19 vars, 389 obs)
{res}{text}(19 vars, 485 obs)
{res}{text}(19 vars, 540 obs)
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str38}, now {bf:str40} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 551 obs)
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str38}, now {bf:str40} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 586 obs)
{res}{text}(19 vars, 634 obs)
{p 0 7 2}
(variable
{bf:UtilityName} was {bf:str44}, now {bf:str45} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str38}, now {bf:str55} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 660 obs)
{p 0 7 2}
(variable
{bf:UtilityName} was {bf:str44}, now {bf:str45} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str38}, now {bf:str55} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 642 obs)
UtilityID: contains nonnumeric characters; {res}replaced {txt}as {res}long
{txt}(2 missing values generated)
{res}{txt}{p 0 7 2}
(variable
{bf:UtilityName} was {bf:str44}, now {bf:str45} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str37}, now {bf:str55} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 666 obs)
UtilityID already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:UtilityName} was {bf:str44}, now {bf:str45} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str38}, now {bf:str55} to accommodate using data's values)
{p_end}

{com}. destring RetirementYear, gen(Retirement_Year)
{txt}RetirementYear: all characters numeric; Retirement_Year {res}generated {txt}as {res}int
{txt}(223 missing values generated)
{res}{txt}
{com}. collapse (max) Retirement_Year, by(UtilityID PlantCode PlantName GeneratorID)
{res}{txt}
{com}. tempfile retired_plants
{txt}
{com}. save `retired_plants' //This tempfile should have retirement dates for each generator
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000g{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. *Active Generators in 2014-2022
. drop _all
{txt}
{com}. tempfile cumulator
{txt}
{com}. quietly save `cumulator', emptyok
{txt}
{com}. forval year=2014(1)2022{c -(}
{txt}  2{com}.         if `year' == 2014 {c -(}
{txt}  3{com}.                 import excel "../Raw/EIA/EIA_Coal_Plant_Data/existing_gen_units_`year'.xls", clear firstrow cellrange(A2)
{txt}  4{com}.                 gen year = `year'
{txt}  5{com}.                 append using `cumulator'
{txt}  6{com}.                 quietly save `cumulator', replace
{txt}  7{com}.         {c )-}
{txt}  8{com}.         if `year' > 2014 & `year' <= 2020 {c -(}
{txt}  9{com}.                 import excel "../Raw/EIA/EIA_Coal_Plant_Data/existing_gen_units_`year'.xlsx", clear firstrow cellrange(A2)
{txt} 10{com}.                 gen year = `year'
{txt} 11{com}.                 append using `cumulator'
{txt} 12{com}.                 quietly save `cumulator', replace
{txt} 13{com}.         {c )-}
{txt} 14{com}.         if `year' > 2020 {c -(}
{txt} 15{com}.                 import excel "../Raw/EIA/EIA_Coal_Plant_Data/Coal Generators `year'.xlsx", clear firstrow cellrange(A2)
{txt} 16{com}.                 gen year = `year'
{txt} 17{com}.                 append using `cumulator'
{txt} 18{com}.                 quietly save `cumulator', replace
{txt} 19{com}.         {c )-}
{txt} 20{com}. {c )-}
{res}{text}(19 vars, 1,145 obs)
{res}{text}(19 vars, 968 obs)
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str39}, now {bf:str40} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 844 obs)
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str39}, now {bf:str40} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 789 obs)
{p 0 7 2}
(variable
{bf:PlantName} was {bf:str39}, now {bf:str40} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 738 obs)
{res}{text}(19 vars, 668 obs)
{res}{text}(19 vars, 599 obs)
{res}{text}(19 vars, 569 obs)
{res}{text}(19 vars, 510 obs)

{com}. 
. destring PlannedRetirementYear, gen(Planned_Retirement_Year)
{txt}PlannedRetirementYear: all characters numeric; Planned_Retirement_Year {res}generated {txt}as {res}int
{txt}(5590 missing values generated)
{res}{txt}
{com}. 
. ren UtilityName plant_company
{res}{txt}
{com}. replace plant_company = subinstr(plant_company, ".", "",.) 
{txt}(198 real changes made)

{com}. replace plant_company = subinstr(plant_company, ",", "",.) 
{txt}(778 real changes made)

{com}. replace plant_company = strtrim(plant_company)
{txt}(0 real changes made)

{com}. replace plant_company = strupper(plant_company) 
{txt}(6,796 real changes made)

{com}. xfill plant_company, i(UtilityID)
{txt}plant_company is not constant within UtilityID -> fill not performed

{com}. 
. /*
> *Balancing Data into even panels
> egen eia_generator_id = group(PlantCode GeneratorID)
> xtset eia_generator_id year
> tsfill, full
> gen no_longer_active_or_tracked = missing(UtilityID)
> xfill UtilityID PlantCode PlantName OperatingYear GeneratorID plant_company, i(eia_generator_id)
> */
. 
. 
. *Bringing in Retirement date as a factcheck
. merge m:1  UtilityID PlantCode PlantName GeneratorID using `retired_plants', keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           5,408
{txt}{col 9}from master{col 30}{res}           5,408{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}           1,422{txt}  
{col 5}{hline 41}

{com}. 
. save "../Intermediate/usa_eia_generator_data_retirement.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/usa_eia_generator_data_retirement.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/usa_eia_generator_data_retirement.dta{rm}
saved
{p_end}

{com}. 
. 
. use  "../Intermediate/usa_eia_generator_data_retirement.dta", clear
{txt}
{com}. *Planned Variables 
. egen eia_generator_id = group(PlantCode GeneratorID)
{txt}
{com}. egen planned_retirement_year_earliest = min(Planned_Retirement_Year), by(eia_generator_id)
{txt}(4,003 missing values generated)

{com}. egen planned_retirement_year_latest = min(Planned_Retirement_Year), by(eia_generator_id)
{txt}(4,003 missing values generated)

{com}. egen planned_retirement_year_2017 = min(Planned_Retirement_Year) if year >= 2017, by(eia_generator_id)
{txt}(5,337 missing values generated)

{com}. gen has_plans_to_retire = !missing(Planned_Retirement_Year)
{txt}
{com}. egen announced_retirement_plans = min(year) if has_plans_to_retire == 1, by(eia_generator_id)
{txt}(5,590 missing values generated)

{com}. 
. 
. egen tag = tag(Planned_Retirement_Year eia_generator_id)
{txt}
{com}. egen eia_retire_yr_switch = total(tag), by(eia_generator_id)
{txt}
{com}. by eia_generator_id (year), sort: gen eia_n_changes = sum(Planned_Retirement_Year != Planned_Retirement_Year[_n-1] & Planned_Retirement_Year != 1)
{txt}
{com}. egen eia_first_plan =  min(Planned_Retirement_Year) if eia_n_changes == 1, by(eia_generator_id)
{txt}(5,781 missing values generated)

{com}. egen eia_second_plan =  min(Planned_Retirement_Year) if eia_n_changes == 2, by(eia_generator_id)
{txt}(6,693 missing values generated)

{com}. egen eia_third_plan =  min(Planned_Retirement_Year) if eia_n_changes == 3, by(eia_generator_id)
{txt}(6,782 missing values generated)

{com}. egen eia_fourth_plan =  min(Planned_Retirement_Year) if eia_n_changes == 4, by(eia_generator_id)
{txt}(6,827 missing values generated)

{com}. egen eia_fifth_plan =  min(Planned_Retirement_Year) if eia_n_changes == 5, by(eia_generator_id)
{txt}(6,827 missing values generated)

{com}. 
. 
. xtset eia_generator_id

{txt}{col 1}Panel variable: {res}eia_generator_id{txt} (unbalanced)

{com}. xfill announced_retirement_plans
{txt}
{com}. xfill planned_retirement_year_earliest
{txt}
{com}. 
. 
. 
. 
. replace plant_company = "HOOSIER ENERGY RURAL ELECTRIC COOPERATIVE INC" if plant_company == "HOOSIER ENERGY R E C INC"
{txt}variable {bf}{res}plant_company{sf}{txt} was {bf}{res}str40{sf}{txt} now {bf}{res}str45{sf}
{txt}(18 real changes made)

{com}. replace plant_company = "BASIN ELECTRIC POWER COOPERATIVE" if plant_company == "BASIN ELECTRIC POWER COOP"
{txt}(72 real changes made)

{com}. replace plant_company = "BLACK HILLS CORPORATION" if plant_company == "BLACK HILLS POWER INC"
{txt}(12 real changes made)

{com}. replace plant_company = "DOMINION ENERGY INC" if plant_company == "DOMINION ENERGY SOUTH CAROLINA INC"
{txt}(11 real changes made)

{com}. replace plant_company = "DTE ENERGY CO" if plant_company == "DTE ELECTRIC COMPANY"
{txt}(114 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY CAROLINAS LLC"
{txt}(105 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY FLORIDA INC"
{txt}(8 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY FLORIDA LLC"
{txt}(18 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY INDIANA INC"
{txt}(17 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY INDIANA LLC"
{txt}(97 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY KENTUCKY INC"
{txt}(9 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY OHIO INC"
{txt}(4 real changes made)

{com}. replace plant_company = "DUKE ENERGY CORPORATION" if plant_company == "DUKE ENERGY PROGRESS - (NC)"
{txt}(57 real changes made)

{com}. replace plant_company = "EAST KENTUCKY POWER COOPERATIVE INC" if plant_company == "EAST KENTUCKY POWER COOP INC"
{txt}(60 real changes made)

{com}. replace plant_company = "EVERGY INC" if plant_company == "EVERGY KANSAS CENTRAL INC"
{txt}(20 real changes made)

{com}. replace plant_company = "EVERGY INC" if plant_company == "EVERGY METRO"
{txt}(20 real changes made)

{com}. replace plant_company = "FIRSTENERGY CORP" if plant_company == "FIRSTENERGY GENERATION CORP"
{txt}(62 real changes made)

{com}. replace plant_company = "GULF POWER COMPANY" if plant_company == "GULF POWER CO"
{txt}(34 real changes made)

{com}. replace plant_company = "HALLADOR ENERGY COMPANY" if plant_company == "HALLADOR POWER COMPANY LLC"
{txt}(2 real changes made)

{com}. replace plant_company = "OTTER TAIL CORPORATION" if plant_company == "OTTER TAIL CO"
{txt}(0 real changes made)

{com}. replace plant_company = "PORTLAND GENERAL ELECTRIC COMPANY" if plant_company == "PORTLAND GENERAL ELECTRIC CO"
{txt}(6 real changes made)

{com}. replace plant_company = "SAN MIGUEL ELECTRIC COOPERATIVE INC" if plant_company == "SAN MIGUEL ELECTRIC COOP INC"
{txt}(9 real changes made)

{com}. replace plant_company = "SOUTHERN ILLINOIS POWER CORP" if plant_company == "SOUTHERN ILLINOIS POWER COOP"
{txt}(33 real changes made)

{com}. replace plant_company = "TRI-STATE GENERATION AND TRANSMISSION ASSOCIATION INC" if plant_company == "TRI-STATE G & T ASSN INC"
{txt}variable {bf}{res}plant_company{sf}{txt} was {bf}{res}str45{sf}{txt} now {bf}{res}str53{sf}
{txt}(53 real changes made)

{com}. replace plant_company = "WESTERN FARMERS ELECTRIC COOPERATIVE" if plant_company == "WESTERN FARMERS ELEC COOP INC"
{txt}(9 real changes made)

{com}. replace plant_company = "AES CORPORATION (THE)" if plant_company == "AES BEAVER VALLEY"
{txt}(2 real changes made)

{com}. replace plant_company = "AES CORPORATION (THE)" if plant_company == "AES HAWAII INC"
{txt}(5 real changes made)

{com}. replace plant_company = "AES CORPORATION (THE)" if plant_company == "AES HAWAII LLC"
{txt}(3 real changes made)

{com}. replace plant_company = "AES CORPORATION (THE)" if plant_company == "AES SHADY POINT LLC"
{txt}(10 real changes made)

{com}. replace plant_company = "AES CORPORATION (THE)" if plant_company == "AES WR LTD PARTNERSHIP"
{txt}(9 real changes made)

{com}. replace plant_company = "AES CORPORATION (THE)" if plant_company == "AG PROCESSING INC"
{txt}(2 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG CHALK POINT LLC"
{txt}(8 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG ENERGY SERVICES - PLUM POINT"
{txt}(9 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG HOMER CITY SERVICES LLC"
{txt}(27 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG HUNTLEY OPERATIONS INC"
{txt}(4 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG POWER MIDWEST LP"
{txt}(16 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG REMA LLC"
{txt}(10 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG TEXAS POWER LLC"
{txt}(54 real changes made)

{com}. replace plant_company = "NRG ENERGY INC" if plant_company == "NRG WHOLESALE GENERATION LP"
{txt}(4 real changes made)

{com}. replace plant_company = "PPL CORP" if plant_company == "PPL MONTOUR LLC"
{txt}(3 real changes made)

{com}. replace plant_company = "TALEN ENERGY CORPORATION" if plant_company == "TALEN MONTANA LLC"
{txt}(31 real changes made)

{com}. replace plant_company = "VISTRA CORP" if plant_company == "VISTRA ENERGY MIAMI FORT"
{txt}(6 real changes made)

{com}. 
. 
. rename(PlantName GeneratorID) (Plant Unit)
{res}{txt}
{com}. 
. *Standardize Unit Names (First Pass)
. replace Unit = subinstr(Unit, "GEN", "Unit ", .)
{txt}variable {bf}{res}Unit{sf}{txt} was {bf}{res}str5{sf}{txt} now {bf}{res}str7{sf}
{txt}(786 real changes made)

{com}. replace Unit = subinstr(Unit, "G", "Unit ", 1)
{txt}variable {bf}{res}Unit{sf}{txt} was {bf}{res}str7{sf}{txt} now {bf}{res}str11{sf}
{txt}(454 real changes made)

{com}. replace Unit = subinstr(Unit, "ST", "Unit ", 1)
{txt}(224 real changes made)

{com}. replace Unit = subinstr(Unit, "S0", "Unit ", 1)
{txt}(9 real changes made)

{com}. replace Unit = subinstr(Unit, "CO", "Unit ", 1)
{txt}(27 real changes made)

{com}. replace Unit = subinstr(Unit, "PC", "Unit ", 1)
{txt}(18 real changes made)

{com}. replace Unit = "Unit " + Unit if regexm(Unit, "^[0-9]+$")
{txt}(5,135 real changes made)

{com}. 
. *TG10 Issue
. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. 
. replace Plant = "A. B. Brown power station" if Plant == "A B Brown"
{txt}(18 real changes made)

{com}. replace Plant = "AES Hawaii Generation Plant" if Plant == "AES Hawaii"
{txt}(8 real changes made)

{com}. replace Plant = "AES Warrior Run Generation Plant" if Plant == "AES Warrior Run Cogeneration Facility"
{txt}(9 real changes made)

{com}. replace Plant = "Allen Fossil Plant" if Plant == "Allen"
{txt}(3 real changes made)

{com}. replace Plant = "Allen S. King Generating Plant" if Plant == "Allen S King"
{txt}(9 real changes made)

{com}. replace Plant = "Ames Municipal Power Plant" if Plant == "Ames Electric Services Power Plant"
{txt}(4 real changes made)

{com}. replace Plant = "Antelope Valley Station" if Plant == "Antelope Valley"
{txt}(18 real changes made)

{com}. replace Plant = "Apache Generating Station" if Plant == "Apache Station"
{txt}(13 real changes made)

{com}. replace Plant = "Archer Daniels Midland Cedar Rapids Power Plant" if Plant == "Archer Daniels Midland Cedar Rapids"
{txt}(54 real changes made)

{com}. replace Plant = "Archer Daniels Midland Clinton Power Plant" if Plant == "Archer Daniels Midland Clinton" 
{txt}(18 real changes made)

{com}. replace Unit = "Unit " + Unit if Plant == "Archer Daniels Midland Clinton Power Plant"
{txt}(18 real changes made)

{com}. replace Plant = "Archer Daniels Midland Decatur Power Plant" if Plant == "Archer Daniels Midland Decatur"
{txt}(63 real changes made)

{com}. replace Plant = "Asbury Generating Station" if Plant == "Asbury"
{txt}(6 real changes made)

{com}. replace Plant = "Asheville Plant" if Plant == "Asheville"
{txt}(12 real changes made)

{com}. replace Plant = "Avon Lake power station" if Plant == "Avon Lake"
{txt}(10 real changes made)

{com}. replace Plant = "Bailly Generating Station" if Plant == "Bailly"
{txt}(8 real changes made)

{com}. replace Plant = "Baldwin Energy Station" if Plant == "Baldwin Energy Complex"
{txt}(24 real changes made)

{com}. replace Plant = "Barry Steam Plant" if Plant == "Barry"
{txt}(21 real changes made)

{com}. replace Plant = "Belews Creek Steam Station" if Plant == "Belews Creek"
{txt}(16 real changes made)

{com}. replace Plant = "Belle River Power Plant" if Plant == "Belle River"
{txt}(18 real changes made)

{com}. replace Plant = "Big Bend Station" if Plant == "Big Bend"
{txt}(28 real changes made)

{com}. replace Plant = "Big Brown Steam Electric Station" if Plant == "Big Brown"
{txt}(8 real changes made)

{com}. replace Plant = "Big Cajun II Power Plant" if Plant == "Big Cajun 2"
{txt}(19 real changes made)

{com}. replace Plant = "Big Sandy Plant" if Plant == "Big Sandy"
{txt}(3 real changes made)

{com}. replace Plant = "Big Stone Power Plant" if Plant == "Big Stone"
{txt}(9 real changes made)

{com}. replace Plant = "Birchwood Power Facility" if Plant == "Birchwood Power"
{txt}(7 real changes made)

{com}. replace Plant = "Black Dog Generating Station" if Plant == "Black Dog"
{txt}(2 real changes made)

{com}. replace Plant = "Blue Valley Power Plant" if Plant == "Blue Valley"
{txt}(3 real changes made)

{com}. replace Plant = "Boardman Plant" if Plant == "Boardman"
{txt}(6 real changes made)

{com}. replace Plant = "Bonanza power station" if Plant == "Bonanza"
{txt}(9 real changes made)

{com}. replace Plant = "Brame Energy power station" if Plant == "Brame Energy Center"
{txt}(9 real changes made)

{com}. replace Plant = "Brandon Shores Generating Station" if Plant == "Brandon Shores"
{txt}(18 real changes made)

{com}. replace Plant = "Brayton Point power station" if Plant == "Brayton Point"
{txt}(9 real changes made)

{com}. replace Plant = "Bridgeport Harbor Station" if Plant == "Bridgeport Station"
{txt}(7 real changes made)

{com}. replace Plant = "Brunner Island power station" if Plant == "Brunner Island"
{txt}(14 real changes made)

{com}. replace Plant = "Bull Run Fossil Plant" if Plant == "Bull Run"
{txt}(9 real changes made)

{com}. replace Plant = "Burlington Generating Station" if Plant == "Burlington (IA)"
{txt}(8 real changes made)

{com}. replace Plant = "C.D. McIntosh power station" if Plant == "C D McIntosh Jr"
{txt}(7 real changes made)

{com}. replace Plant = "Cambria Cogeneration Facility" if Plant == "Cambria Cogen"
{txt}(5 real changes made)

{com}. replace Plant = "Cane Run Station" if Plant == "Cane Run"
{txt}(3 real changes made)

{com}. replace Plant = "Carbon Power Plant" if Plant == "Carbon"
{txt}(2 real changes made)

{com}. replace Plant = "Cardinal Plant" if Plant == "Cardinal"
{txt}(27 real changes made)

{com}. replace Plant = "Cayuga Generating Station" if Plant == "Cayuga"
{txt}(18 real changes made)

{com}. replace Plant = "Cayuga power station (New York)" if Plant == "Cayuga Operating Company"
{txt}(10 real changes made)

{com}. replace Plant = "Cedar Bay Cogeneration Plant" if Plant == "Cedar Bay Generating Company LP"
{txt}(2 real changes made)

{com}. replace Plant = "Chalk Point Generating Station" if Plant == "Chalk Point LLC"
{txt}(14 real changes made)

{com}. replace Plant = "Chambers Cogeneration power station" if Plant == "Chambers Cogeneration LP"
{txt}(8 real changes made)

{com}. replace Plant = "Charles R. Lowman Power Plant" if Plant == "Charles R Lowman"
{txt}(18 real changes made)

{com}. replace Plant = "Chamois power station" if Plant == "Chamois"
{txt}(2 real changes made)

{com}. replace Plant = "Cherokee Station" if Plant == "Cherokee"
{txt}(4 real changes made)

{com}. replace Plant = "Chesapeake Energy Center" if Plant == "Chesapeake"
{txt}(4 real changes made)

{com}. replace Plant = "Chesterfield power station" if Plant == "Chesterfield"
{txt}(28 real changes made)

{com}. replace Plant = "Cheswick Power Station" if Plant == "Cheswick Power Plant"
{txt}(8 real changes made)

{com}. replace Plant = "Cholla Generating Station" if Plant == "Cholla"
{txt}(25 real changes made)

{com}. replace Plant = "Clifty Creek Station" if Plant == "Clifty Creek"
{txt}(54 real changes made)

{com}. replace Plant = "Clinch River Plant" if Plant == "Clinch River"
{txt}(5 real changes made)

{com}. replace Plant = "Clover power station" if Plant == "Clover"
{txt}(18 real changes made)

{com}. replace Plant = "Coal Creek Station" if Plant == "Coal Creek"
{txt}(18 real changes made)

{com}. replace Plant = "Coffeen power station" if Plant == "Coffeen"
{txt}(10 real changes made)

{com}. replace Plant = "Colbert Fossil Plant" if Plant == "Colbert"
{txt}(10 real changes made)

{com}. replace Plant = "Coleto Creek power station" if Plant == "Coleto Creek"
{txt}(9 real changes made)

{com}. replace Plant = "Coronado Generating Station" if Plant == "Coronado"
{txt}(18 real changes made)

{com}. replace Plant = "Coyote Station" if Plant == "Coyote"
{txt}(9 real changes made)

{com}. replace Plant = "Crane Generating Station" if Plant == "CP Crane Power, LLC"
{txt}(6 real changes made)

{com}. replace Plant = "Craig Station" if Plant == "Craig (CO)"
{txt}(27 real changes made)

{com}. replace Plant = "Crist Plant" if Plant == "Crist"
{txt}(28 real changes made)

{com}. replace Plant = "Cross Generating Station" if Plant == "Cross"
{txt}(36 real changes made)

{com}. replace Plant = "Crystal River Energy Complex" if Plant == "Crystal River"
{txt}(26 real changes made)

{com}. replace Plant = "Cumberland Steam Plant" if Plant == "Cumberland (TN)"
{txt}(18 real changes made)

{com}. replace Plant = "Dale power station" if Plant == "Dale"
{txt}(6 real changes made)

{com}. replace Plant = "Dallman Station" if Plant == "Dallman"
{txt}(30 real changes made)

{com}. replace Plant = "Dave Johnston Power Plant" if Plant == "Dave Johnston"
{txt}(36 real changes made)

{com}. replace Plant = "Dickerson Generating Station" if Plant == "Dickerson"
{txt}(18 real changes made)

{com}. replace Plant = "Dolet Hills power station" if Plant == "Dolet Hills"
{txt}(7 real changes made)

{com}. replace Plant = "Duck Creek Station" if Plant == "Duck Creek"
{txt}(5 real changes made)

{com}. replace Plant = "Dunkirk Steam Station" if Plant == "Dunkirk Generating Plant"
{txt}(31 real changes made)

{com}. replace Plant = "E.W. Brown Generating Station" if Plant == "E W Brown"
{txt}(19 real changes made)

{com}. replace Plant = "Eagle Valley Station" if Plant == "Eagle Valley (IN)"
{txt}(8 real changes made)

{com}. replace Plant = "East Bend Generating Station" if Plant == "East Bend"
{txt}(9 real changes made)

{com}. replace Plant = "Ebensburg Generating Plant" if Plant == "Ebensburg Power"
{txt}(9 real changes made)

{com}. replace Plant = "Edgecombe Genco LLC" if Plant == "Edgecombe Genco"
{txt}(0 real changes made)

{com}. replace Plant = "Edgewater Generating Station" if Plant == "Edgewater"
{txt}(14 real changes made)

{com}. replace Plant = "Elizabethtown Power Plant" if Plant == "Elizabethtown Power LLC"
{txt}(4 real changes made)

{com}. replace Unit = "" if Plant == "Elizabethtown Power Plant"
{txt}(4 real changes made)

{com}. replace Plant = "Elm Road power station" if Plant == "Elm Road Generating Station"
{txt}(18 real changes made)

{com}. replace Plant = "Elmer Smith Station" if Plant == "Elmer Smith"
{txt}(12 real changes made)

{com}. replace Plant = "Endicott Generating Station" if Plant == "Endicott Station"
{txt}(2 real changes made)

{com}. replace Unit = "" if Plant == "Endicott Generating Station"
{txt}(2 real changes made)

{com}. replace Plant = "Escalante Generating Station" if Plant == "Escalante"
{txt}(6 real changes made)

{com}. replace Plant = "F. B. Culley power station" if Plant == "F B Culley"
{txt}(18 real changes made)

{com}. replace Plant = "Fernandina Beach Mill power station" if Plant == "Fernandina Beach Mill"
{txt}(2 real changes made)

{com}. replace Plant = "Flint Creek Power Plant" if Plant == "Flint Creek"
{txt}(9 real changes made)

{com}. replace Plant = "Four Corners Steam Plant" if Plant == "Four Corners"
{txt}(18 real changes made)

{com}. replace Plant = "Frank Ratts Generating Station" if Plant == "Frank E Ratts"
{txt}(2 real changes made)

{com}. replace Plant = "G.G. Allen Steam Plant" if Plant == "G G Allen"
{txt}(39 real changes made)

{com}. replace Plant = "Gadsden Steam Plant" if Plant == "Gadsden"
{txt}(2 real changes made)

{com}. replace Plant = "Gallatin Fossil Plant" if Plant == "Gallatin (TN)"
{txt}(36 real changes made)

{com}. replace Plant = "Gavin Power Plant" if Plant == "Gavin Power, LLC"
{txt}(12 real changes made)

{com}. replace Plant = "Genoa Station" if Plant == "Genoa"
{txt}(7 real changes made)

{com}. replace Unit = "" if Plant == "Genoa Station"
{txt}(7 real changes made)

{com}. replace Plant = "George Neal Station South" if Plant == "George Neal South"
{txt}(9 real changes made)

{com}. replace Plant = "Gerald Gentleman Station" if Plant == "Gerald Gentleman"
{txt}(18 real changes made)

{com}. replace Plant = "Ghent Generating Station" if Plant == "Ghent"
{txt}(36 real changes made)

{com}. replace Plant = "Gibbons Creek Steam Station" if Plant == "Gibbons Creek"
{txt}(5 real changes made)

{com}. replace Plant = "Gibson Generating Station" if Plant == "Gibson"
{txt}(45 real changes made)

{com}. replace Plant = "Glen Lyn Plant" if Plant == "Glen Lyn"
{txt}(2 real changes made)

{com}. replace Plant = "Gorgas Steam Plant" if Plant == "Gorgas"
{txt}(17 real changes made)

{com}. replace Plant = "Green River Generating Station" if Plant == "Green River"
{txt}(2 real changes made)

{com}. replace Plant = "Greene County Steam Plant" if Plant == "Greene County"
{txt}(4 real changes made)

{com}. replace Plant = "H. Wilson Sundt Generating Station" if Plant == "H Wilson Sundt Generating Station"
{txt}(2 real changes made)

{com}. replace Plant = "Hammond Steam Generating Station" if Plant == "Hammond"
{txt}(20 real changes made)

{com}. replace Plant = "Hardin Generating Station" if Plant == "Hardin Generator Project"
{txt}(9 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "Hardin Generating Station"
{txt}(9 real changes made)

{com}. replace Plant = "Harding Street Station" if Plant == "Harding Street"
{txt}(6 real changes made)

{com}. replace Plant = "Harllee Branch Generating Plant" if Plant == "Harllee Branch"
{txt}(3 real changes made)

{com}. replace Plant = "Harrington Station" if Plant == "Harrington"
{txt}(27 real changes made)

{com}. replace Plant = "Havana power station" if Plant == "Havana"
{txt}(5 real changes made)

{com}. replace Plant = "Hawthorn Station" if Plant == "Hawthorn"
{txt}(9 real changes made)

{com}. replace Plant = "Hayden Station" if Plant == "Hayden"
{txt}(18 real changes made)

{com}. replace Plant = "Healy Power Plant" if Plant == "Healy"
{txt}(16 real changes made)

{com}. replace Plant = "Hennepin power station" if Plant == "Hennepin Power Station"
{txt}(10 real changes made)

{com}. replace Plant = "Herbert Wagner Generating Station" if Plant == "Herbert A Wagner"
{txt}(15 real changes made)

{com}. replace Plant = "Holcomb Station" if Plant == "Holcomb"
{txt}(9 real changes made)

{com}. replace Plant = "Hoot Lake Plant" if Plant == "Hoot Lake"
{txt}(14 real changes made)

{com}. replace Plant = "Hugo power station" if Plant == "Hugo"
{txt}(9 real changes made)

{com}. replace Plant = "Hunter Power Plant" if Plant == "Hunter"
{txt}(27 real changes made)

{com}. replace Plant = "Huntington Power Plant" if Plant == "Huntington"
{txt}(18 real changes made)

{com}. replace Plant = "Iatan Generating Station" if Plant == "Iatan"
{txt}(18 real changes made)

{com}. replace Plant = "Independence Steam Station" if Plant == "Independence Steam Electric Station"
{txt}(18 real changes made)

{com}. replace Plant = "Indian River power station" if Plant == "Indian River Generating Station"
{txt}(9 real changes made)

{com}. replace Plant = "Indiantown Cogen power station" if Plant == "Indiantown Cogeneration LP"
{txt}(6 real changes made)

{com}. replace Plant = "Intermountain power station" if Plant == "Intermountain Power Project"
{txt}(18 real changes made)

{com}. replace Plant = "J. K. Spruce Station" if Plant == "J K Spruce"
{txt}(18 real changes made)

{com}. replace Plant = "J.T. Deely Station" if Plant == "J T Deely"
{txt}(18 real changes made)

{com}. replace Plant = "Jack Watson Generating Plant" if Plant == "Jack Watson"
{txt}(2 real changes made)

{com}. replace Plant = "James River Cogeneration Plant" if Plant == "James River Genco LLC"
{txt}(10 real changes made)

{com}. replace Plant = "James River power station" if Plant == "James River Power Station"
{txt}(13 real changes made)

{com}. replace Plant = "Jim Bridger Steam Plant" if Plant == "Jim Bridger"
{txt}(36 real changes made)

{com}. replace Plant = "John B. Rich Memorial Power Station" if Plant == "John B Rich Memorial Power Station"
{txt}(9 real changes made)

{com}. replace Plant = "John P Madgett" if Plant == "John Madgett Station"
{txt}(0 real changes made)

{com}. replace Plant = "John W. Turk Jr. Power Plant" if Plant == "John W Turk Jr Power Plant"
{txt}(9 real changes made)

{com}. replace Plant = "Johnsonville Fossil Plant" if Plant == "Johnsonville"
{txt}(18 real changes made)

{com}. replace Plant = "Joliet 29 Generating Station" if Plant == "Joliet 29"
{txt}(8 real changes made)

{com}. replace Plant = "Joliet 9 Generating Station" if Plant == "Joliet 9"
{txt}(4 real changes made)

{com}. replace Plant = "Joppa Steam Plant" if Plant == "Joppa Steam"
{txt}(48 real changes made)

{com}. replace Plant = "Kammer Plant" if Plant == "Kammer"
{txt}(3 real changes made)

{com}. replace Plant = "Kanawha River Plant" if Plant == "Kanawha River"
{txt}(6 real changes made)

{com}. replace Plant = "Kapstone Power Plant" if Plant == "Kapstone"
{txt}(2 real changes made)

{com}. replace Plant = "Keystone Generating Station" if Plant == "Keystone"
{txt}(18 real changes made)

{com}. replace Plant = "Kincaid Generation LLC" if Plant == "Kincaid Generating Station"
{txt}(0 real changes made)

{com}. replace Plant = "Kingston Fossil Plant" if Plant == "Kingston"
{txt}(81 real changes made)

{com}. replace Plant = "Kraft Plant" if Plant == "Kraft"
{txt}(3 real changes made)

{com}. replace Plant = "Kyger Creek Station" if Plant == "Kyger Creek"
{txt}(45 real changes made)

{com}. replace Plant = "La Cygne Generating Station" if Plant == "La Cygne"
{txt}(18 real changes made)

{com}. replace Plant = "Labadie power station" if Plant == "Labadie"
{txt}(36 real changes made)

{com}. replace Plant = "Lake Road (MO) power station" if Plant == "Lake Road (MO)"
{txt}(3 real changes made)

{com}. replace Plant = "Lansing power station" if Plant == "Lansing"
{txt}(9 real changes made)

{com}. replace Plant = "Leland Olds Station" if Plant == "Leland Olds"
{txt}(18 real changes made)

{com}. replace Plant = "Lewis & Clark Station" if Plant == "Lewis & Clark"
{txt}(7 real changes made)

{com}. replace Plant = "Limestone Generating Station" if Plant == "Limestone"
{txt}(18 real changes made)

{com}. replace Plant = "Lon Wright Power Plant" if Plant == "Lon Wright"
{txt}(27 real changes made)

{com}. replace Plant = "Longview Plant" if Plant == "Longview Power Plant"
{txt}(8 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "Longview Plant"
{txt}(8 real changes made)

{com}. replace Plant = "Louisa Generating Station" if Plant == "Louisa"
{txt}(9 real changes made)

{com}. replace Plant = "Lumberton Power Plant" if Plant == "Lumberton"
{txt}(1 real change made)

{com}. replace Unit = "" if Plant == "Lumberton Power Plant"
{txt}(1 real change made)

{com}. replace Plant = "Major Oak power station" if Plant == "Major Oak Power"
{txt}(16 real changes made)

{com}. replace Plant = "Marion Plant" if Plant == "Marion"
{txt}(33 real changes made)

{com}. replace Plant = "Marshall Steam Station" if Plant == "Marshall (NC)"
{txt}(34 real changes made)

{com}. replace Plant = "Martin Drake Power Plant" if Plant == "Martin Drake"
{txt}(15 real changes made)

{com}. replace Plant = "Martin Lake Steam Station" if Plant == "Martin Lake"
{txt}(27 real changes made)

{com}. replace Plant = "Mayo Generating Plant" if Plant == "Mayo"
{txt}(9 real changes made)

{com}. replace Plant = "McIntosh Steam Plant" if Plant == "McIntosh"
{txt}(5 real changes made)

{com}. replace Plant = "McMeekin Station" if Plant == "McMeekin"
{txt}(4 real changes made)

{com}. replace Plant = "Mecklenburg power station" if Plant == "Mecklenburg Power Station"
{txt}(10 real changes made)

{com}. replace Plant = "Meramec Power Plant" if Plant == "Meramec"
{txt}(22 real changes made)

{com}. replace Plant = "Merom Generating Station" if Plant == "Merom"
{txt}(18 real changes made)

{com}. replace Plant = "Merrimack Station" if Plant == "Merrimack"
{txt}(18 real changes made)

{com}. replace Plant = "Miami Fort Station" if Plant == "Miami Fort"
{txt}(19 real changes made)

{com}. replace Plant = "Michigan City Generating Station" if Plant == "Michigan City"
{txt}(9 real changes made)

{com}. replace Plant = "Mill Creek Station" if Plant == "Mill Creek (KY)"
{txt}(36 real changes made)

{com}. replace Plant = "Milton R. Young Station" if Plant == "Milton R Young"
{txt}(18 real changes made)

{com}. replace Plant = "Mitchell Plant" if Plant == "Mitchell (WV)"
{txt}(18 real changes made)

{com}. replace Plant = "Monroe Power Plant" if Plant == "Monroe (MI)"
{txt}(36 real changes made)

{com}. replace Plant = "Monticello Steam Station" if Plant == "Monticello"
{txt}(12 real changes made)

{com}. replace Plant = "Montrose Station" if Plant == "Montrose"
{txt}(10 real changes made)

{com}. replace Plant = "Morgantown Energy Facility (WV)" if Plant == "Morgantown Energy Facility"
{txt}(9 real changes made)

{com}. replace Plant = "Morgantown Generating Station" if Plant == "Morgantown Generating Plant"
{txt}(16 real changes made)

{com}. replace Plant = "Mount Storm power station" if Plant == "Mt Storm"
{txt}(27 real changes made)

{com}. replace Plant = "Muscatine Generating Station" if Plant == "Muscatine Plant #1"
{txt}(36 real changes made)

{com}. replace Plant = "Muskingum River Plant" if Plant == "Muskingum River"
{txt}(5 real changes made)

{com}. replace Plant = "Muskogee Generating Station" if Plant == "Muskogee"
{txt}(19 real changes made)

{com}. replace Plant = "Naughton Power Plant" if Plant == "Naughton"
{txt}(24 real changes made)

{com}. replace Plant = "Navajo Generating Station" if Plant == "Navajo"
{txt}(15 real changes made)

{com}. replace Plant = "Nearman Creek power station" if Plant == "Nearman Creek"
{txt}(9 real changes made)

{com}. replace Plant = "Nebraska City Station" if Plant == "Nebraska City"
{txt}(18 real changes made)

{com}. replace Plant = "Neil Simpson Power Plants" if Plant == "Neil Simpson II"
{txt}(9 real changes made)

{com}. replace Unit = "Plant II" if Plant == "Neil Simpson Power Plants"
{txt}(9 real changes made)

{com}. replace Plant = "New Madrid Power Plant" if Plant == "New Madrid"
{txt}(18 real changes made)

{com}. replace Plant = "Newton power station" if Plant == "Newton"
{txt}(11 real changes made)

{com}. replace Plant = "North Omaha Station" if Plant == "North Omaha"
{txt}(24 real changes made)

{com}. replace Plant = "Northeastern Station" if Plant == "Northeastern"
{txt}(11 real changes made)

{com}. replace Plant = "Nucla Station" if Plant == "Nucla"
{txt}(20 real changes made)

{com}. replace Plant = "Oak Grove Plant" if Plant == "Oak Grove (TX)" //Replace Leading O in unit James
{txt}(18 real changes made)

{com}. replace Plant = "Oklaunion power station" if Plant == "Oklaunion"
{txt}(6 real changes made)

{com}. replace Plant = "Ottumwa Generating Station" if Plant == "Ottumwa"
{txt}(9 real changes made)

{com}. replace Plant = "Paradise Fossil Plant" if Plant == "Paradise"
{txt}(12 real changes made)

{com}. replace Plant = "Pawnee Station" if Plant == "Pawnee"
{txt}(9 real changes made)

{com}. replace Plant = "Philip Sporn Power Plant" if Plant == "Philip Sporn"
{txt}(4 real changes made)

{com}. replace Plant = "Picway Power Plant" if Plant == "Picway"
{txt}(1 real change made)

{com}. replace Plant = "Pirkey Power Plant" if Plant == "Pirkey"
{txt}(9 real changes made)

{com}. replace Plant = "Platte Generating Station" if Plant == "Platte"
{txt}(9 real changes made)

{com}. replace Plant = "Pleasant Prairie Power Plant" if Plant == "Pleasant Prairie"
{txt}(8 real changes made)

{com}. replace Plant = "Pleasants power station" if Plant == "Pleasants Power Station"
{txt}(6 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "Plum Point Energy Station"
{txt}(9 real changes made)

{com}. replace Plant = "Portland Generating Station" if Plant == "Portland (PA)"
{txt}(2 real changes made)

{com}. replace Plant = "Powerton Generating Station" if Plant == "Powerton"
{txt}(18 real changes made)

{com}. replace Plant = "Prairie Creek Generating Station" if Plant == "Prairie Creek"
{txt}(22 real changes made)

{com}. replace Plant = "Presque Isle Power Plant" if Plant == "Presque Isle"
{txt}(25 real changes made)

{com}. replace Plant = "Pulliam Power Plant" if Plant == "Pulliam"
{txt}(10 real changes made)

{com}. replace Plant = "Quindaro power station" if Plant == "Quindaro"
{txt}(2 real changes made)

{com}. replace Plant = "Rawhide Energy Station" if Plant == "Rawhide"
{txt}(9 real changes made)

{com}. replace Plant = "Ray Nixon Power Plant" if Plant == "Ray D Nixon"
{txt}(9 real changes made)

{com}. replace Plant = "Reid Gardner Station" if Plant == "Reid Gardner"
{txt}(3 real changes made)

{com}. replace Plant = "Rio Bravo Jasmin Power Plant" if Plant == "Rio Bravo Jasmin"
{txt}(2 real changes made)

{com}. replace Unit = "" if Plant == "Rio Bravo Jasmin Power Plant"
{txt}(2 real changes made)

{com}. replace Plant = "River Rouge Power Plant" if Plant == "River Rouge"
{txt}(9 real changes made)

{com}. replace Plant = "River Valley power station" if Plant == "River Valley"
{txt}(10 real changes made)

{com}. replace Plant = "Riverside (IA) power station" if Plant == "Riverside"
{txt}(1 real change made)

{com}. replace Plant = "Roanoke Valley Energy Facility" if Plant == "Roanoke Valley Energy Facililty I"
{txt}(1 real change made)

{com}. replace Plant = "Robert Reid Power Plant" if Plant == "Robert A Reid"
{txt}(5 real changes made)

{com}. replace Plant = "Rockport Plant" if Plant == "Rockport"
{txt}(18 real changes made)

{com}. replace Plant = "Roxboro Steam Plant" if Plant == "Roxboro"
{txt}(36 real changes made)

{com}. replace Plant = "Rumford Cogeneration Plant" if Plant == "Rumford Cogeneration"
{txt}(1 real change made)

{com}. replace Plant = "Rush Island power station" if Plant == "Rush Island"
{txt}(18 real changes made)

{com}. replace Plant = "San Juan Generating Station" if Plant == "San Juan"
{txt}(22 real changes made)

{com}. replace Plant = "San Miguel Electric Cooperative" if Plant == "San Miguel"
{txt}(9 real changes made)

{com}. replace Plant = "Sandow power station" if Plant == "Sandow No 4"
{txt}(4 real changes made)

{com}. replace Plant = "Sandow power station" if Plant == "Sandow No 5"
{txt}(4 real changes made)

{com}. replace Plant = "Sandy Creek Plant" if Plant == "Sandy Creek Energy Station"
{txt}(9 real changes made)

{com}. replace Plant = "Scherer Steam Generating Station" if Plant == "Scherer"
{txt}(35 real changes made)

{com}. replace Plant = "Schiller Station" if Plant == "Schiller"
{txt}(18 real changes made)

{com}. replace Plant = "Scholz Generating Plant" if Plant == "Scholz"
{txt}(2 real changes made)

{com}. replace Plant = "Seminole Generating Station" if Plant == "Seminole (FL)"
{txt}(18 real changes made)

{com}. replace Plant = "Shawnee Fossil Plant" if Plant == "Shawnee"
{txt}(81 real changes made)

{com}. replace Plant = "Shawville Generating Station" if Plant == "Shawville"
{txt}(8 real changes made)

{com}. replace Plant = "Sheldon Station" if Plant == "Sheldon"
{txt}(18 real changes made)

{com}. replace Plant = "Sherburne County Plant" if Plant == "Sherburne County"
{txt}(27 real changes made)

{com}. replace Plant = "Shiras Station" if Plant == "Shiras"
{txt}(15 real changes made)

{com}. replace Plant = "Sibley Generating Station" if Plant == "Sibley"
{txt}(11 real changes made)

{com}. replace Plant = "Silver Bay Power Plant" if Plant == "Silver Bay Power"
{txt}(18 real changes made)

{com}. replace Plant = "Silver Lake Plant" if Plant == "Silver Lake"
{txt}(4 real changes made)

{com}. replace Plant = "Sioux Power Plant" if Plant == "Sioux"
{txt}(18 real changes made)

{com}. replace Plant = "Sooner Generating Station" if Plant == "Sooner"
{txt}(18 real changes made)

{com}. replace Plant = "South Oak Creek Plant" if Plant == "South Oak Creek"
{txt}(36 real changes made)

{com}. replace Plant = "Springerville power station" if Plant == "Springerville"
{txt}(36 real changes made)

{com}. replace Plant = "St. Clair Power Plant" if Plant == "St Clair"
{txt}(40 real changes made)

{com}. replace Plant = "St. Johns River Power Park" if Plant == "St Johns River Power Park"
{txt}(8 real changes made)

{com}. replace Plant = "Stanton Station" if Plant == "Stanton"
{txt}(3 real changes made)

{com}. replace Plant = "Sunnyside Cogeneration Facility" if Plant == "Sunnyside Cogen Associates"
{txt}(9 real changes made)

{com}. replace Plant = "Syl Laskin Energy Center" if Plant == "Syl Laskin"
{txt}(2 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "TS Power Plant"
{txt}(9 real changes made)

{com}. replace Plant = "Tanners Creek Plant" if Plant == "Tanners Creek"
{txt}(4 real changes made)

{com}. replace Plant = "Thomas Hill Energy Center" if Plant == "Thomas Hill"
{txt}(27 real changes made)

{com}. replace Plant = "Tolk Station" if Plant == "Tolk"
{txt}(18 real changes made)

{com}. replace Plant = "Trenton Channel Power Plant" if Plant == "Trenton Channel"
{txt}(11 real changes made)

{com}. replace Plant = "Trimble County power station" if Plant == "Trimble County"
{txt}(18 real changes made)

{com}. replace Plant = "Valley Power Plant" if Plant == "Valley (WI)"
{txt}(3 real changes made)

{com}. replace Plant = "Valmont Station" if Plant == "Valmont"
{txt}(3 real changes made)

{com}. replace Plant = "Wabash River Generating Station" if Plant == "Wabash River"
{txt}(10 real changes made)

{com}. replace Plant = "Wansley Plant" if Plant == "Wansley"
{txt}(16 real changes made)

{com}. replace Plant = "Warrick Power Plant" if Plant == "Warrick"
{txt}(36 real changes made)

{com}. replace Plant = "Wateree Station" if Plant == "Wateree"
{txt}(18 real changes made)

{com}. replace Plant = "Waukegan Generating Station" if Plant == "Waukegan"
{txt}(16 real changes made)

{com}. replace Plant = "Welsh Power Plant" if Plant == "Welsh"
{txt}(20 real changes made)

{com}. replace Plant = "Weston Power Plant" if Plant == "Weston"
{txt}(21 real changes made)

{com}. replace Plant = "Westwood Generating Station" if Plant == "Westwood Generation LLC"
{txt}(9 real changes made)

{com}. replace Plant = "White Bluff Generating Plant" if Plant == "White Bluff"
{txt}(18 real changes made)

{com}. replace Plant = "Whitewater Valley Generating Station" if Plant == "Whitewater Valley"
{txt}(18 real changes made)

{com}. replace Plant = "Widows Creek Fossil Plant" if Plant == "Widows Creek"
{txt}(2 real changes made)

{com}. replace Plant = "Will County Generating Station" if Plant == "Will County"
{txt}(8 real changes made)

{com}. replace Plant = "Williams Station" if Plant == "Williams"
{txt}(9 real changes made)

{com}. replace Plant = "Winyah Generating Station" if Plant == "Winyah"
{txt}(36 real changes made)

{com}. replace Plant = "Wood River Station" if Plant == "Wood River"
{txt}(4 real changes made)

{com}. replace Plant = "Wygen I power station" if Plant == "Wygen 1"
{txt}(9 real changes made)

{com}. replace Plant = "Wygen II power station" if Plant == "Wygen 2"
{txt}(9 real changes made)

{com}. replace Unit = "" if Plant == "Wygen I power station" | Plant == "Wygen II power station"
{txt}(18 real changes made)

{com}. replace Plant = "Wyodak Power Plant" if Plant == "Wyodak"
{txt}(9 real changes made)

{com}. replace Plant = "Yates Steam Generating Plant" if Plant == "Yates"
{txt}(7 real changes made)

{com}. replace Plant = "Yorktown power station" if Plant == "Yorktown"
{txt}(10 real changes made)

{com}. 
. replace Plant = "Campbell Generating Plant" if Plant == "J H Campbell"
{txt}(27 real changes made)

{com}. replace Plant = "Boswell Energy Center" if Plant == "Clay Boswell"
{txt}(26 real changes made)

{com}. replace Unit = "" if Plant == "Allen S. King Generating Plant"
{txt}(9 real changes made)

{com}. replace Plant = "Amos Plant" if Plant == "John E Amos"
{txt}(27 real changes made)

{com}. replace Plant = "Centralia Power Plant" if Plant == "Transalta Centralia Generation"
{txt}(15 real changes made)

{com}. replace Plant = "Colstrip Steam Plant" if Plant == "Colstrip"
{txt}(30 real changes made)

{com}. replace Plant = "Columbia Energy Center" if Plant == "Columbia (WI)"
{txt}(18 real changes made)

{com}. replace Plant = "Colver Green Energy power station" if Plant == "Colver Green Energy"
{txt}(3 real changes made)

{com}. replace Unit = "" if Plant =="Colver Green Energy power station"
{txt}(3 real changes made)

{com}. replace Plant = "Comanche power station" if Plant == "Comanche (CO)"
{txt}(26 real changes made)

{com}. replace Plant = "Conemaugh Generating Station" if Plant == "Conemaugh"
{txt}(18 real changes made)

{com}. replace Plant = "Cooper power station" if Plant == "Cooper"
{txt}(18 real changes made)

{com}. replace Plant = "Cope Station" if Plant == "Cope"
{txt}(5 real changes made)

{com}. replace Plant = "Daniel Generating Plant" if Plant == "Victor J Daniel Jr"
{txt}(18 real changes made)

{com}. replace Plant = "Edwardsport power station" if Plant == "Edwardsport"
{txt}(27 real changes made)

{com}. replace Plant = "Fort Martin power station" if Plant == "FirstEnergy Fort Martin Power Station"
{txt}(18 real changes made)

{com}. replace Unit = "Unit 1" if Unit == "Unit 01" & Plant == "Dry Fork Station"
{txt}(9 real changes made)

{com}. replace Plant = "Gaston Steam Plant" if Plant == "E C Gaston"
{txt}(15 real changes made)

{com}. 
. replace Plant = "George Neal Station North" if Plant == "George Neal North"
{txt}(13 real changes made)

{com}. replace Plant = "Grand River Energy Center" if Plant == "GREC"
{txt}(12 real changes made)

{com}. replace Plant = "Harrison power station" if Plant == "FirstEnergy Harrison Power Station"
{txt}(27 real changes made)

{com}. replace Unit = "Unit 5R" if Plant == "Hawthorn Station" & Unit  == "Unit 5"
{txt}(9 real changes made)

{com}. replace Unit = "Clean Coal Unit 2" if Plant == "Healy Power Plant" & Unit  == "Unit 2"
{txt}variable {bf}{res}Unit{sf}{txt} was {bf}{res}str11{sf}{txt} now {bf}{res}str17{sf}
{txt}(7 real changes made)

{com}. replace Unit = subinstr(Unit, "O", "", .) if Plant == "Oak Grove Plant"
{txt}(18 real changes made)

{com}. replace Plant = "John Madgett Station" if Plant == "John P Madgett"
{txt}(9 real changes made)

{com}. replace Plant = "Karn Generating Plant" if Plant == "Dan E Karn"
{txt}(36 real changes made)

{com}. replace Unit = "Unit 1" if  Plant == "Karn Generating Plant" & Unit == "1A"
{txt}(9 real changes made)

{com}. replace Unit = "Unit 2" if  Plant == "Karn Generating Plant" & Unit == "2A"
{txt}(9 real changes made)

{com}. replace Plant = "Kincaid Generating Station" if Plant == "Kincaid Generation LLC"
{txt}(18 real changes made)

{com}. replace Plant = "Kimberly-Clark Chester Power Plant" if Plant == "Cope" //IDK
{txt}(0 real changes made)

{com}. replace Plant = "Miller Steam Plant" if Plant == "James H Miller Jr"
{txt}(36 real changes made)

{com}. replace Plant = "Montour Steam Station" if Plant == "TalenEnergy Montour"
{txt}(20 real changes made)

{com}. replace Plant = "Mt. Carmel Cogeneration Facility" if Plant == "Foster Wheeler Mt Carmel Cogen"
{txt}(9 real changes made)

{com}. replace Unit = subinstr(Unit, "T", "", .) if Plant == "Mt. Carmel Cogeneration Facility" 
{txt}(9 real changes made)

{com}. replace Plant = "Mountaineer Plant" if Plant == "Mountaineer"
{txt}(9 real changes made)

{com}. replace Plant = "North Valmy Station" if Plant == "North Valmy"
{txt}(18 real changes made)

{com}. replace Plant = "Northampton Generating Plant" if Plant == "Northampton Generating Company LP"
{txt}(9 real changes made)

{com}. replace Plant = "Parish Generating Station" if Plant == "W A Parish"
{txt}(36 real changes made)

{com}. replace Plant = "Sikeston power station" if Plant == "Sikeston Power Station"
{txt}(9 real changes made)

{com}. replace Plant = "Spiritwood Industrial Park" if Plant == "Spiritwood Station"
{txt}(7 real changes made)

{com}. replace Unit = "" if Plant == "Spiritwood Industrial Park"
{txt}(7 real changes made)

{com}. replace Plant = "Red Hills Generation Facility" if Plant == "Red Hills Generating Facility"
{txt}(9 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "Red Hills Generation Facility" & Unit == "RHUnit F"
{txt}(9 real changes made)

{com}. replace Plant = "Spring Grove power station" if Plant == "P H Glatfelter"
{txt}(17 real changes made)

{com}. replace Unit = "" if Plant == "Spring Grove power station" & Unit == "Unit 1" //Picking first unit
{txt}(3 real changes made)

{com}. replace Plant = "Sammis Plant" if Plant == "FirstEnergy W H Sammis"
{txt}(42 real changes made)

{com}. replace Plant = "Rosebud Power Plant" if Plant == "Colstrip Energy LP"
{txt}(9 real changes made)

{com}. replace Plant = "Roy S. Nelson Generating Plant" if Plant == "R S Nelson" //Bug here
{txt}(9 real changes made)

{com}. replace Plant = "Schahfer Generating Station" if Plant == "R M Schahfer"
{txt}(32 real changes made)

{com}. replace Plant = "Seward Power Plant" if Plant == "Seward (PA)"
{txt}(9 real changes made)

{com}. replace Unit = "Unit 6" if Plant == "Seward Power Plant" 
{txt}(9 real changes made)

{com}. replace Plant = "Spurlock power station" if Plant == "H L Spurlock"
{txt}(36 real changes made)

{com}. replace Plant = "St. Nicholas Cogeneration Plant" if Plant == "St Nicholas Cogen Project"
{txt}(9 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "St. Nicholas Cogeneration Plant" & Unit == "SNCP"
{txt}(9 real changes made)

{com}. replace Unit = "" if Plant == "Virginia City Hybrid Energy Center"
{txt}(9 real changes made)

{com}. replace Plant = "Walter Scott Jr. power station" if Plant == "Walter Scott Jr Energy Center"
{txt}(20 real changes made)

{com}. replace Plant = "Wilson Station" if Plant == "D B Wilson"
{txt}(9 real changes made)

{com}. replace Plant = "Wygen III power station" if Plant == "Wygen III"
{txt}(9 real changes made)

{com}. replace Unit = "" if Plant == "Wygen III power station"
{txt}(9 real changes made)

{com}. replace Plant = "Petersburg Generating Station" if Plant == "AES Petersburg"
{txt}(34 real changes made)

{com}. replace Plant = "Plant Bowen" if Plant == "Bowen"
{txt}(36 real changes made)

{com}. replace Plant = "Polk Power Station" if Plant == "Polk"
{txt}(11 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "Polk Power Station" & Unit == "1CA" //Picking randomly
{txt}(3 real changes made)

{com}. replace Plant = "Green Station" if Plant == "R D Green"
{txt}(17 real changes made)

{com}. replace Unit = "" if Plant == "Edwardsport power station" & Unit == "CT1"
{txt}(9 real changes made)

{com}. replace Plant = "Prairie State Energy Campus" if Plant == "Prairie State Generating Station"
{txt}(18 real changes made)

{com}. replace Unit = "Unit 1" if Plant == "Red Hills Generating Facility" & Unit == "RHUnit F"
{txt}(0 real changes made)

{com}. replace Plant = "Kimberly-Clark Chester Power Plant" if Plant == "Chester Operations"
{txt}(1 real change made)

{com}. replace Plant = "Bruce Mansfield power station" if Plant == "FirstEnergy Bruce Mansfield"
{txt}(15 real changes made)

{com}. replace Plant = "Cobb Generating Plant" if Plant == "B C Cobb"
{txt}(4 real changes made)

{com}. replace Plant = "Conesville Power Plant" if Plant == "Conesville"
{txt}(16 real changes made)

{com}. replace Plant = "Corette Plant" if Plant == "J E Corette Plant"
{txt}(1 real change made)

{com}. replace Plant = "Eastlake Power Plant" if Plant == "FirstEnergy Eastlake"
{txt}(3 real changes made)

{com}. replace Plant = "Edwards Generation Plant" if Plant == "E D Edwards"
{txt}(17 real changes made)

{com}. replace Plant = "Gallagher Generating Station" if Plant == "R Gallagher"
{txt}(14 real changes made)

{com}. replace Plant = "Heskett Station" if Plant == "R M Heskett"
{txt}(16 real changes made)

{com}. replace Plant = "Huntley power station" if Plant == "C R Huntley Generating Station" 
{txt}(4 real changes made)

{com}. replace Unit = "Unit 68" if Plant == "Huntley power station" & Unit == "S68"
{txt}(2 real changes made)

{com}. replace  Plant = "Hutchings Station" if Plant == "O H Hutchings"
{txt}(5 real changes made)

{com}. replace Plant = "Killen Generating Station" if Plant == "Killen Station"
{txt}(4 real changes made)

{com}. replace Plant = "Kline Cogeneration Facility" if Plant == "Kline Township Cogen Facility"
{txt}(4 real changes made)

{com}. replace Unit = "" if Plant == "Kline Cogeneration Facility"
{txt}(4 real changes made)

{com}. replace Plant = "Lansing Smith Generating Plant" if Plant == "Lansing Smith"
{txt}(4 real changes made)

{com}. replace Plant = "Milton Kapp Generating Station" if Plant == "Milton L Kapp"
{txt}(2 real changes made)

{com}. replace Plant = "Mitchell Steam Generating Plant (Georgia)" if Plant == "Mitchell (GA)"
{txt}(2 real changes made)

{com}. replace Plant = "Wabash River Generating Station" if Plant == "Wabash River"
{txt}(0 real changes made)

{com}. replace Plant = "Weadock Generating Plant" if Plant == "J C Weadock"
{txt}(4 real changes made)

{com}. replace Plant = "Whiting Generating Plant" if Plant == "J R Whiting"
{txt}(6 real changes made)

{com}. replace Plant = "Zimmer Generating Station" if Plant == "W H Zimmer"
{txt}(8 real changes made)

{com}. replace Plant = "Beaver Valley Generation Plant" if Plant == "AES Beaver Valley Partners Beaver Valley"
{txt}(2 real changes made)

{com}. replace Plant = "Lake Shore Plant" if Plant == "FirstEnergy Lake Shore"
{txt}(1 real change made)

{com}. replace Plant = "Ashtabula power station" if Plant == "FirstEnergy Ashtabula" 
{txt}(1 real change made)

{com}. 
. 
. //Unmatched Plants
. replace Plant = "Riverton Power Plant" if Plant == "XXXX" 
{txt}(0 real changes made)

{com}. replace Plant = "Stoneman Generating Station" if Plant == "XXXX"
{txt}(0 real changes made)

{com}. replace Plant = "Sutherland Generating Station" if Plant == "XXXX"
{txt}(0 real changes made)

{com}. replace Plant = "W.S. Lee Steam Station" if Plant == "XXXX"
{txt}(0 real changes made)

{com}. 
. 
. keep Plant Unit announced_retirement_plans planned_retirement_year_earliest planned_retirement_year_2017 planned_retirement_year_latest eia*
{txt}
{com}. collapse announced_retirement_plans planned_retirement_year_latest planned_retirement_year_earliest planned_retirement_year_2017 eia*, by(Plant Unit)
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. 
. rename (announced_retirement_plans planned_retirement_year_earliest) (eia_announce_retire_yr  eia_retire_yr_plan)
{res}{txt}
{com}. 
. gen eia_plan_dif_1 = eia_second_plan - eia_first_plan
{txt}(1,120 missing values generated)

{com}. gen eia_plan_dif_2 = eia_third_plan - eia_second_plan
{txt}(1,177 missing values generated)

{com}. gen eia_plan_dif_3 = eia_fourth_plan - eia_third_plan
{txt}(1,194 missing values generated)

{com}. gen eia_plan_dif_4 = eia_fifth_plan - eia_fourth_plan
{txt}(1,195 missing values generated)

{com}. gen eia = 1
{txt}
{com}. 
. 
. save "../Intermediate/usa_eia_generator_data.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/usa_eia_generator_data.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/usa_eia_generator_data.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. {txt}
{com}. include "../Data_Cleaning/Build_EU_Generator.do" //EU
{txt}
{com}. 
. 
. **********************************************************************
. ** Euro Units--Beyond Coal
. ********************************************************************
. import excel "../Raw/EuroPlantEmission/2022-10-20-Europe_Beyond_Coal-European_Coal_Database.xlsx", sheet("Unit") firstrow clear cellrange(A2)
{res}{text}(17 vars, 1,218 obs)

{com}. drop if missing(EBCplantID)
{txt}(10 observations deleted)

{com}. order EBCplantID EBCunitID Plantname Owner
{txt}
{com}. sort Owner
{txt}
{com}. 
. 
. replace Owner="Albioma SA" if Owner=="Albioma"
{txt}(5 real changes made)

{com}. // Bulgarian Energy Holding (BEH) matched
. replace Owner="CEZ AS" if Owner=="CEZ"
{txt}(52 real changes made)

{com}. replace Owner="Electricite de France SA (EDF Group)" if Owner=="EDF"
{txt}(22 real changes made)

{com}. // Elektroprivreda Srbije (EPS) matched
. replace Owner="EnBW Energie Baden-Württemberg AG" if Owner=="EnBW"
{txt}(19 real changes made)

{com}. replace Owner="Enea SA" if Owner=="Enea"
{txt}(24 real changes made)

{com}. replace Owner="Enel SpA" if Owner=="Enel"
{txt}(21 real changes made)

{com}. replace Owner="Energa SA" if Owner=="Energa"
{txt}(11 real changes made)

{com}. replace Owner="Energeticky a prumyslovy holding a.s. (EPH)" if Owner=="EPH"
{txt}(62 real changes made)

{com}. replace Owner="EVN AG" if Owner=="EVN"
{txt}(1 real change made)

{com}. replace Owner="Fortum Oyj" if Owner=="Fortum"
{txt}(17 real changes made)

{com}. replace Owner="PGE SA (Polska Grupa Energetyczna SA)" if Owner=="PGE"
{txt}(72 real changes made)

{com}. replace Owner="Polskie Górnictwo Naftowe i Gazownictwo SA (PGNiG)" if Owner=="PGNiG"
{txt}(6 real changes made)

{com}. replace Owner="Public Power Corporation SA (PPC)" if Owner=="PPC"
{txt}(24 real changes made)

{com}. replace Owner="ContourGlobal plc" if Owner=="ContourGlobal"
{txt}(5 real changes made)

{com}. replace Owner="RWE AG" if Owner=="RWE"
{txt}(72 real changes made)

{com}. replace Owner="Sev.en Energy Group" if Owner=="Sev.en Energy AG"
{txt}(13 real changes made)

{com}. //Sokolovská Uhelná AS matched
. replace Owner="STEAG GmbH" if Owner=="Steag"
{txt}(19 real changes made)

{com}. replace Owner="TAURON Polska Energia S.A" if Owner=="Tauron"
{txt}(40 real changes made)

{com}. replace Owner="ZE PAK SA Group (Zespół Elektrowni Pątnów Adamów Konin SA)" if Owner=="ZEPAK"
{txt}(16 real changes made)

{com}. replace Owner="Elektrocieplownia Bedzin SA" if Owner=="EC Będzin SA"
{txt}(1 real change made)

{com}. // Vaskiluodon Voima Oy matched
. replace Owner="Helen Ltd" if Owner=="Helen"
{txt}(3 real changes made)

{com}. replace Owner="EFT Rudnik i Termoelektrana Stanari d.o.o" if Owner=="EFT"
{txt}(1 real change made)

{com}. replace Owner="Magyar Villamos Művek Zrt (MVM)" if Owner=="MVM"
{txt}(9 real changes made)

{com}. 
. gen announced_retirement_plans = year(Dateofretirementannouncement)
{txt}(548 missing values generated)

{com}. ren (Plantname Owner AnnouncedRetirementyear EBCunitID) (Plant  plant_company planned_retirement_year_earliest Unit)
{res}{txt}
{com}. keep Plant plant_company planned_retirement_year_earliest announced_retirement_plans EBCplantID Unit
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. 
. 
. replace Unit = regexr(Unit, "^" + EBCplantID + "-?", "")
{txt}(1,208 real changes made)

{com}. replace Unit = "Unit " + Unit
{txt}(1,208 real changes made)

{com}. 
. 
. egen eu_id = group(Plant plant_company planned_retirement_year_earliest announced_retirement_plans EBCplantID Unit)
{txt}(548 missing values generated)
{res}{txt}
{com}. 
. gen modified_plant = Plant
{txt}
{com}. replace modified_plant = modified_plant + " power station" if strpos(modified_plant, "power station") == 0
{txt}variable {bf}{res}modified_plant{sf}{txt} was {bf}{res}str43{sf}{txt} now {bf}{res}str52{sf}
{txt}(1,083 real changes made)

{com}. replace modified_plant = subinstr(modified_plant, ".", "",.) 
{txt}(2 real changes made)

{com}. replace modified_plant = subinstr(modified_plant, ",", "",.) 
{txt}(0 real changes made)

{com}. replace modified_plant = strtrim(modified_plant)
{txt}(0 real changes made)

{com}. replace modified_plant = strupper(modified_plant) 
{txt}(1,208 real changes made)

{com}. 
. drop if Plant == "Karvina power station" & Unit == "Unit 1" //Dropping one weird observation
{txt}(1 observation deleted)

{com}. 
. 
. 
. save "../Intermediate/eu_beyond_coal_generator_data.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/eu_beyond_coal_generator_data.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/eu_beyond_coal_generator_data.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. {txt}
{com}. 
. *************************************************************
. *************************************************************
. ************ CODE INVOLVED WITH COMMERICAL DATA 
. *************************************************************
. *************************************************************
. 
. //Psedo-Data generated here and below! See Do file for detail
. 
. *************************************************************
. ************ PREPARE BORROWER FILE
. *************************************************************
. //This comes up with the sample of borrowers and links the borrowers
. //to the underlying dealscan and IJ global datasets
. 
. include "../Data_Cleaning/Build_Borrower_File.do" 
{txt}
{com}. 
. 
. *************************************************************
. ************ PREPARE BORROWER FILE
. *************************************************************
. 
. // defines borrowers as GCEL parents
. // creates link files between main borrower identifier and the IJ Global and Dealscan company identifiers
. 
. //get Dealscan borrowers linked to GCEL
. use ../Raw/DealScan/DS_newIDs_GCEL_link, clear
{txt}
{com}. ren Borrower_Id CompanyID_DS
{res}{txt}
{com}. drop if missing(GCELcompanyID)
{txt}(154,987 observations deleted)

{com}. duplicates report CompanyID_DS

{p 0 4}{txt}Duplicates in terms of {res} CompanyID_DS{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}         {res}1352             0
        {txt}2 {c |}          {res}106            53
        {txt}3 {c |}           {res}54            36
        {txt}4 {c |}           {res}12             9
        {txt}5 {c |}           {res}15            12
       {txt}10 {c |}           {res}10             9
{txt}{hline 10}{c BT}{hline 27}

{com}. //we aggregate to GCEL parent ID. 
. keep CompanyID_DS Company_DS ParentCompany_GCEL ParentID_GCEL 
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(20 observations deleted)

{com}. duplicates report CompanyID_DS //some dealscan companies match to more than one parent small number, represents joint ownership.

{p 0 4}{txt}Duplicates in terms of {res} CompanyID_DS{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}         {res}1360             0
        {txt}2 {c |}           {res}98            49
        {txt}3 {c |}           {res}48            32
        {txt}4 {c |}            {res}8             6
        {txt}5 {c |}           {res}15            12
{txt}{hline 10}{c BT}{hline 27}

{com}. tempfile ds_gcel_list
{txt}
{com}. save `ds_gcel_list'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000i{rm}
saved
as .dta format
{p_end}

{com}. keep ParentID_GCEL
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(1,101 observations deleted)

{com}. tempfile ds_gcel_ids 
{txt}
{com}. save `ds_gcel_ids'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000j{rm}
saved
as .dta format
{p_end}

{com}. 
. //gen IJ global borrowers linked to GCEL 
. use ../Raw/IJGlobal/gcel_ijglobal_link, clear
{txt}
{com}. drop if missing(GCELcompanyID)
{txt}(49,619 observations deleted)

{com}. 
. //aggreagte to GCEL parent ID 
. keep TransactionId Borrower_CompanyName Borrower_ParentCompany ParentCompany_GCEL GCELParentId 
{txt}
{com}. rename GCELParentId ParentID_GCEL
{res}{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(2 observations deleted)

{com}. drop TransactionId
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(4,235 observations deleted)

{com}. duplicates report Borrower_CompanyName

{p 0 4}{txt}Duplicates in terms of {res} Borrower_CompanyName{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}          {res}463             0
        {txt}2 {c |}           {res}24            12
        {txt}3 {c |}           {res}12             8
{txt}{hline 10}{c BT}{hline 27}

{com}. rename Borrower_CompanyName Borrower_CompanyName_IJG 
{res}{txt}
{com}. rename Borrower_ParentCompany Borrower_ParentCompany_IJG
{res}{txt}
{com}. 
. replace Borrower_CompanyName_IJG = "China Gezhouba Group Corporation" if Borrower_CompanyName_IJG=="China Gezhouba Group Corporation "
{txt}(1 real change made)

{com}. replace Borrower_CompanyName_IJG = "China Energy Engineering Group" if Borrower_CompanyName_IJG=="China Energy Engineering Group "
{txt}(1 real change made)

{com}. replace Borrower_CompanyName_IJG = "Universal Coal" if Borrower_CompanyName_IJG=="Universal Coal "
{txt}(1 real change made)

{com}. 
. //Some IJ Global companies match to more than one GCEL parent with small number, represents joint ownership.
. tempfile ijg_gcel_list
{txt}
{com}. save `ijg_gcel_list'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000k{rm}
saved
as .dta format
{p_end}

{com}. keep ParentID_GCEL
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(147 observations deleted)

{com}. tempfile ijg_gcel_ids
{txt}
{com}. save `ijg_gcel_ids'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000l{rm}
saved
as .dta format
{p_end}

{com}. 
. //LOAD PARENT GCEL INFO 
. use ../Intermediate/GCEL_parent_clean, clear 
{txt}
{com}. //merge in lists of GCEL parent IDs from IJ Global and Dealscan borrowers
. merge 1:1 ParentID_GCEL using `ds_gcel_ids', keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             508
{txt}{col 9}from master{col 30}{res}             508{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             427{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen has_ds_matches = _merge == 3
{txt}
{com}. drop _merge
{txt}
{com}. merge 1:1 ParentID_GCEL using `ijg_gcel_ids', keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             583
{txt}{col 9}from master{col 30}{res}             583{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             352{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen has_ijg_matches = _merge == 3
{txt}
{com}. drop _merge
{txt}
{com}. 
. gen borrower_id = ParentID_GCEL
{txt}
{com}. order borrower_id
{txt}
{com}. rename ParentCompany borrower_name
{res}{txt}
{com}. order borrower_name, after(borrower_id)
{txt}
{com}. save ../Intermediate/borrower_file, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/borrower_file.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/borrower_file.dta{rm}
saved
{p_end}

{com}. 
. 
. //Now get link from underlying datas to the borower ID in question 
. use `ds_gcel_list', clear
{txt}
{com}. gen borrower_id = ParentID_GCEL 
{txt}(42 missing values generated)

{com}. order borrower_id 
{txt}
{com}. drop ParentID_GCEL
{txt}
{com}. rename ParentCompany_GCEL borrower_name
{res}{txt}
{com}. order borrower_name, after(borrower_id)
{txt}
{com}. drop Company_DS
{txt}
{com}. compress 
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
{txt}  (3,058 bytes saved)

{com}. 
. 
. save ../Intermediate/dealscan_borrowerid_map, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/dealscan_borrowerid_map.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/dealscan_borrowerid_map.dta{rm}
saved
{p_end}

{com}. 
. use `ijg_gcel_list', clear
{txt}
{com}. gen borrower_id = ParentID_GCEL 
{txt}
{com}. order borrower_id 
{txt}
{com}. drop ParentID_GCEL
{txt}
{com}. rename ParentCompany_GCEL borrower_name
{res}{txt}
{com}. order borrower_name, after(borrower_id)
{txt}
{com}. compress 
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}Borrower_CompanyName_IJG{sf}{txt} was {bf}{res}str100{sf}{txt} now {bf}{res}str53{sf}
  {txt}variable {bf}{res}Borrower_ParentCompany_IJG{sf}{txt} was {bf}{res}str100{sf}{txt} now {bf}{res}str41{sf}
{txt}  (53,892 bytes saved)

{com}. save ../Intermediate/ijglobal_borrowerid_map, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/ijglobal_borrowerid_map.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/ijglobal_borrowerid_map.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. {txt}
{com}. 
. 
. *************************************************************
. ************ PREPARE TRANSACTION FILE
. *************************************************************
. 
. //1. build transaction file
. //              this is at the lender of transaction_id X borrower_id
. 
. //2. build lender file linked to transaction file
. //              definition of lead bank is in below file
. //              this is at the level of transaction_id X lender_id
. 
. //Psedo-Data used for both of these files
. include "../Data_Cleaning/Build_Transaction_File_Loans.do"
{txt}
{com}. 
. ******************************************************************************************************
. ** BUILD A TRANSACTION FILE
. ******************************************************************************************************
. 
. 
. 
. *************************************************************************
. ** STEP 1: Normalize IJG and Dealscan transaction Data
. *************************************************************************
. 
. //get borrowers mapped to internal ID
. use ../Raw/IJGlobal/transaction_borrower_records, clear
{txt}
{com}. recast str100 Borrower_CompanyName Borrower_ParentCompany
{txt}
{com}. rename Borrower_CompanyName Borrower_CompanyName_IJG
{res}{txt}
{com}. rename Borrower_ParentCompany Borrower_ParentCompany_IJG
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. joinby Borrower_CompanyName_IJG using ../Intermediate/ijglobal_borrowerid_map
{txt}
{com}. keep TransactionId borrower_id 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(38 observations deleted)

{com}. merge m:1 borrower_id using ../Intermediate/borrower_file, keepusing(borrower_name) keep(3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           4,647{txt}  
{col 5}{hline 41}

{com}. tempfile ij_borrower_map
{txt}
{com}. save `ij_borrower_map'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000m{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. //STEP 1a: Get IJ Global Debt Tranche Records
. 
. use ../Raw/psedo/IJGlobal/transaction_level_data, clear
{txt}
{com}. keep TransactionId TransactionName FinanceType TransactionType TransactionValueLocalCurrenc TransactionCurrency TransactionDebtUSDm 
{txt}
{com}. merge 1:m TransactionId using ../Raw/psedo/IJGlobal/debt_records_tranchelevel, ///
>         keepusing(TrancheId DebtInstrumentSecondaryTyp DebtInstrumentTertiaryType TrancheValuem TrancheMaturityStartDate ///
>                           TranchePricingType TrancheLoanReferenceRate spread_bps) keep(3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:TransactionId} was {bf:float}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          23,790{txt}  
{col 5}{hline 41}

{com}. order TransactionId TrancheId 
{txt}
{com}. 
. // CUT DOWN TO GCEL BORROWERS SAMPLE
. joinby TransactionId using `ij_borrower_map', unmatched(both)  //GCEL transaction
{txt}
{com}. keep if _merge == 3
{txt}(23,444 observations deleted)

{com}. drop _merge
{txt}
{com}. 
. *use facility/tranche level information 
. rename TransactionDebtUSDm DealAmount_ijg
{res}{txt}
{com}. rename TrancheValuem TrancheAmount_ijg
{res}{txt}
{com}. rename TrancheMaturityStartDate start_date
{res}{txt}
{com}. gen start_date_m = mofd(start_date)
{txt}
{com}. order borrower_id start_date DealAmount_ijg TrancheAmount_ijg
{txt}
{com}. compress
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}start_date_m{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}TransactionId{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}long{sf}
  {txt}variable {bf}{res}borrower_name{sf}{txt} was {bf}{res}str77{sf}{txt} now {bf}{res}str63{sf}
  {bf}TransactionName{sf}{txt} is {bf}{res}strL{sf}{txt} now coalesced
  (83,582 bytes saved)

{com}. tempfile ijg_trans 
{txt}
{com}. save `ijg_trans'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000n{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. //*************************************************************************************
. 
. 
. //STEP 1C: Get Dealscan Debt Tranche Records (NEW DEALSCAN DATA) 
. 
. use ../Raw/psedo/Dealscan/tr_dealscan_newformat_tranchelevel,clear
{txt}
{com}. rename Borrower_Id CompanyID_DS
{res}{txt}
{com}. joinby CompanyID_DS using ../Intermediate/dealscan_borrowerid_map.dta, unmatched(both)
{txt}
{com}. keep if _merge == 3
{txt}(453,110 observations deleted)

{com}. drop _merge 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. 
. *rename variables so it's consistent with old format
. rename Deal_Amount_Converted DealAmount_ds
{res}{txt}
{com}. rename Tranche_Amount_Converted TrancheAmount_ds
{res}{txt}
{com}. rename Tranche_Active_Date start_date
{res}{txt}
{com}. gen start_date_m = mofd(start_date)
{txt}
{com}. gen obs_ammendment = Tranche_O_A ~= "Origination"
{txt}
{com}. 
. tempfile ds_trans_new 
{txt}
{com}. save `ds_trans_new'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000o{rm}
saved
as .dta format
{p_end}

{com}. use `ds_trans_new', clear
{txt}
{com}. 
. 
. 
. 
. ** STEP 2: Identify Duplicate Transactions Across Datasets
. 
. 
. //FINAL VERDICT: MATCH BY BORROWER DAY: KEEP THE IJ GLOBAL DEAL
. use `ds_trans_new', clear
{txt}
{com}. joinby borrower_id start_date using `ijg_trans', unmatched(both)                
{txt}
{com}. duplicates report borrower_id TrancheId LPC_Tranche_ID start_date

{p 0 4}{txt}Duplicates in terms of {res} borrower_id TrancheId LPC_Tranche_ID start_date{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}        {res}11432             0
{txt}{hline 10}{c BT}{hline 27}

{com}. 
. keep borrower_id TrancheId LPC_Tranche_ID start_date _merge
{txt}
{com}. gen ds_keep = inlist(_merge,1)
{txt}
{com}. gen ijg_keep = inlist(_merge,2,3)
{txt}
{com}. drop _merge
{txt}
{com}. 
. preserve
{txt}
{com}. 
. keep if ds_keep == 1
{txt}(3,795 observations deleted)

{com}. keep borrower_id LPC_Tranche_ID start_date
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. tempfile dskeep 
{txt}
{com}. save `dskeep'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000q{rm}
saved
as .dta format
{p_end}

{com}. 
. restore
{txt}
{com}. 
. keep if ijg_keep == 1
{txt}(7,637 observations deleted)

{com}. keep borrower_id TrancheId 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. tempfile ijgkeep 
{txt}
{com}. save `ijgkeep'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000r{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. ** STEP 3: Combine two datasets accounting for duplicate transactions
. 
. // FIRST NEED TO NORMALIZE THE DATA
. 
. 
. //Additionally, add in Non-bank Deal level data from Prequin, BDC, and Pitchbook
. use "../Raw/psedo/non_bank_loans_bank_ids", clear
{txt}
{com}. gen date_trans = mdy(6, 1, year) //turn year data into mdy date.   
{txt}
{com}. gen debt_type = "Non-Bank Deal"
{txt}
{com}. gen bond_ind = 0
{txt}
{com}. gen obs_ammendment = 0
{txt}
{com}. rename (debt_amt_usdm gcel_parent_id) (amount_trans_usdm borrower_id)
{res}{txt}
{com}. drop lending* year BankID source
{txt}
{com}. tempfile non_bank
{txt}
{com}. save `non_bank'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000s{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use `ds_trans_new', clear
{txt}
{com}. merge m:1 borrower_id LPC_Tranche_ID start_date using `dskeep', keep(3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:start_date} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           7,637{txt}  
{col 5}{hline 41}

{com}. rename TrancheAmount_ds amount_trans_usdm 
{res}{txt}
{com}. rename All_In_Spread_Drawn_bps spread_bps
{res}{txt}
{com}. rename Tranche_Type loan_type
{res}{txt}
{com}. rename Deal_Purpose deal_purpose
{res}{txt}
{com}. destring amount_trans_usdm,replace
{txt}amount_trans_usdm already numeric; no {res}replace
{txt}
{com}. order LPC_Tranche_ID borrower_id start_date amount_trans_usdm deal_purpose loan_type  spread_bps obs_ammendment
{txt}
{com}. keep LPC_Tranche_ID borrower_id start_date amount_trans_usdm deal_purpose loan_type  spread_bps obs_ammendment
{txt}
{com}. 
. tempfile ds_filt_norm 
{txt}
{com}. save `ds_filt_norm'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000t{rm}
saved
as .dta format
{p_end}

{com}. 
. use `ijg_trans', clear
{txt}
{com}. merge 1:1 borrower_id TrancheId using `ijgkeep', keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           3,795{txt}  
{col 5}{hline 41}

{com}. rename TrancheAmount_ijg amount_trans_usdm
{res}{txt}
{com}. rename TransactionName name_trans
{res}{txt}
{com}. rename DebtInstrumentTertiaryType loan_type
{res}{txt}
{com}. rename DebtInstrumentSecondaryTyp debt_inst
{res}{txt}
{com}. rename FinanceType deal_purpose
{res}{txt}
{com}. 
. order TrancheId borrower_id start_date amount_trans_usdm deal_purpose loan_type debt_inst TransactionType spread_bps
{txt}
{com}. keep TrancheId borrower_id start_date amount_trans_usdm deal_purpose loan_type debt_inst TransactionType spread_bps
{txt}
{com}. 
. //now combine IJglobal and dealscan records
. append using `ds_filt_norm'
{txt}{p 0 7 2}
(variable
{bf:deal_purpose} was {bf:str21}, now {bf:strL} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:loan_type} was {bf:str29}, now {bf:strL} to accommodate using data's values)
{p_end}

{com}. gen source_ds = ~missing(LPC_Tranche_ID)
{txt}
{com}. egen transaction_id = egroup(TrancheId LPC_Tranche_ID start_date), mis
{txt}
{com}. order borrower_id transaction_id LPC_Tranche_ID TrancheId
{txt}
{com}. 
. //clean up differences between dealscan and IJ GLobal
. gen project_finance = inlist(deal_purpose,"Project Finance","Proj. finance")
{txt}
{com}. gen refinance_ind = /*refi_ind == "Yes" | */ deal_purpose == "Debt Repay." | TransactionType == "Refinancing"
{txt}
{com}. gen bond_ind = debt_inst == "Bonds" | inlist(loan_type,"Commercial Bond","Fixed-Rate Bond","Municipal Bond","Islamic Bond","Other Bond","Floating Rate Bond")
{txt}
{com}. 
. //get loan type harmonized
. gen debt_type = "Bond" if bond_ind == 1
{txt}(10,908 missing values generated)

{com}. replace debt_type = "Term Loan" if regexm(lower(loan_type),"term")
{txt}variable {bf}{res}debt_type{sf}{txt} was {bf}{res}str4{sf}{txt} now {bf}{res}str9{sf}
{txt}(5,457 real changes made)

{com}. replace debt_type = "Term Loan" if loan_type == "A Loan"
{txt}(22 real changes made)

{com}. replace debt_type = "Term Loan" if inlist(loan_type,"Other Loan","Islamic Loan","Mezzanine Debt","Mezzanine Tranche")
{txt}(273 real changes made)

{com}. replace debt_type = "Revolver" if regexm(lower(loan_type),"revolver") & missing(debt_type)
{txt}(3,200 real changes made)

{com}. replace debt_type = "Revolver" if loan_type == "364-Day Facility"
{txt}(311 real changes made)

{com}. replace debt_type = "Bridge Loan" if regexm(lower(loan_type),"bridge")
{txt}variable {bf}{res}debt_type{sf}{txt} was {bf}{res}str9{sf}{txt} now {bf}{res}str11{sf}
{txt}(191 real changes made)

{com}. replace debt_type = "Revolver" if regexm(lower(loan_type),"facility") & missing(debt_type)
{txt}(470 real changes made)

{com}. replace debt_type = "Letter of Credit" if regexm(lower(loan_type),"letter") & missing(debt_type)
{txt}variable {bf}{res}debt_type{sf}{txt} was {bf}{res}str11{sf}{txt} now {bf}{res}str16{sf}
{txt}(290 real changes made)

{com}. replace debt_type = "Other" if missing(debt_type)
{txt}(694 real changes made)

{com}. 
. drop loan_type debt_inst
{txt}
{com}. drop deal_purpose TransactionType /*refi_ind*/ 
{txt}
{com}. 
. order borrower_id transaction_id LPC_Tranche_ID TrancheId start_date amount_trans_usdm project_finance refinance_ind bond_ind debt_type spread_bps source_ds
{txt}
{com}. compress
  {txt}variable {bf}{res}transaction_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}project_finance{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}refinance_ind{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}bond_ind{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}source_ds{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}obs_ammendment{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
{txt}  (194,344 bytes saved)

{com}. rename start_date date_trans
{res}{txt}
{com}. //presume IJ Global transactions are not ammendments
. replace obs_ammendment = 0 if missing(obs_ammendment)
{txt}(3,795 real changes made)

{com}. format date_trans %td
{txt}
{com}. rename transaction_id transaction_loan_id
{res}{txt}
{com}. 
. append using `non_bank' //Adding in non-bank data
{txt}{p 0 7 2}
(variable
{bf:transaction_loan_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:bond_ind} was {bf:byte}, now {bf:float} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:obs_ammendment} was {bf:byte}, now {bf:float} to accommodate using data's values)
{p_end}

{com}. 
. //For psedo-code only making transaction_loan_id unique!
. duplicates drop transaction_loan_id, force

{p 0 4}{txt}Duplicates in terms of {res} transaction_loan_id{p_end}

{txt}(1,279 observations deleted)

{com}. 
. save ../Intermediate/transaction_clean_loans, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/transaction_clean_loans.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/transaction_clean_loans.dta{rm}
saved
{p_end}

{com}. 
. 
. ******************************************************************************************************
. ** NOW BUILD A TRANSACTION BY LENDER FILE
. ******************************************************************************************************
. 
. //Add in Non-bank Deal level data from Prequin, BDC, and Pitchbook
. use "../Raw/psedo/non_bank_loans_bank_ids", clear
{txt}
{com}. gen BankAllocation_pct = 100
{txt}
{com}. rename (debt_amt_usdm) (amount_trans_lender_usdm)
{res}{txt}
{com}. keep (transaction_loan_id BankID BankAllocation_pct amount_trans_lender_usdm)
{txt}
{com}. tempfile non_bank
{txt}
{com}. save `non_bank'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000u{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. //Now do dealscan side 
. use  ../Raw/Bank_Sample/Dealscan_Bank_BankSample_Link, clear 
{txt}
{com}. keep LoanConnector_Company_ID BankID
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. rename LoanConnector_Company_ID Lender_Id
{res}{txt}
{com}. tempfile ds_bank_map 
{txt}
{com}. save `ds_bank_map'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000v{rm}
saved
as .dta format
{p_end}

{com}. 
. use ../Intermediate/transaction_clean_loans, clear
{txt}
{com}. keep if source_ds == 1
{txt}(3,094 observations deleted)

{com}. keep transaction_loan_id LPC_Tranche_ID date_trans obs_ammendment
{txt}
{com}. gen Tranche_Active_Date = date_trans
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. merge 1:m LPC_Tranche_ID Tranche_Active_Date using ../Raw/psedo/Dealscan/tr_dealscan_newformat_tranchelender, keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          59,011{txt}  
{col 5}{hline 41}

{com}. merge m:1 Lender_Id using `ds_bank_map', keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          59,011{txt}  
{col 5}{hline 41}

{com}. 
. duplicates tag transaction_loan_id BankID, gen(dups)

{p 0 4}{txt}Duplicates in terms of {res} transaction_loan_id BankID{p_end}
{txt}
{com}. sort transaction_loan_id BankID Lender_Id
{txt}
{com}. gcollapse (max) lead_bank = is_lead_bank_v1 (sum) BankAllocation_pct = Lender_Share, by(transaction_loan_id BankID)
{res}{txt}{res}{txt}
{com}. replace BankAllocation_pct = . if BankAllocation_pct == 0
{txt}(0 real changes made)

{com}. 
. tempfile ds_trans_lender 
{txt}
{com}. save `ds_trans_lender'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000w{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use  ../Raw/Bank_Sample/IJG_Bank_BankSample_Link, clear
{txt}
{com}. keep IJG_BankName BankID
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. rename IJG_BankName Lender_CompanyName
{res}{txt}
{com}. tempfile ijg_bank_map 
{txt}
{com}. save `ijg_bank_map'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00000x{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use ../Intermediate/transaction_clean_loans, clear
{txt}
{com}. keep if source_ds == 0
{txt}(7,373 observations deleted)

{com}. keep transaction_loan_id TrancheId date_trans amount_trans_usdm
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. merge 1:m TrancheId using "../Raw/psedo/IJGlobal/debt_records_tranche_lender_level.dta", keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          12,309{txt}  
{col 5}{hline 41}

{com}. recast str Lender_CompanyName
{txt}
{com}. merge m:1 Lender_CompanyName using `ijg_bank_map', keep(1 3)
{res}{txt}{p 0 7 2}
(variable
{bf:Lender_CompanyName} was {bf:str68}, now {bf:str100} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             752
{txt}{col 9}from master{col 30}{res}             752{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          11,557{txt}  (_merge==3)
{col 5}{hline 41}

{com}. duplicates report transaction_loan_id Lender_CompanyName

{p 0 4}{txt}Duplicates in terms of {res} transaction_loan_id Lender_CompanyName{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}        {res}11603             0
        {txt}2 {c |}          {res}616           308
        {txt}3 {c |}           {res}78            52
        {txt}4 {c |}           {res}12             9
{txt}{hline 10}{c BT}{hline 27}

{com}. duplicates report transaction_loan_id BankID

{p 0 4}{txt}Duplicates in terms of {res} transaction_loan_id BankID{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}        {res}11145             0
        {txt}2 {c |}          {res}932           466
        {txt}3 {c |}          {res}174           116
        {txt}4 {c |}           {res}40            30
        {txt}5 {c |}            {res}5             4
        {txt}6 {c |}            {res}6             5
        {txt}7 {c |}            {res}7             6
{txt}{hline 10}{c BT}{hline 27}

{com}. gen lead_bank = 1 
{txt}
{com}. replace lead_bank = 0 if TrancheRole == "Participant" | TrancheRole == "Public Finance Institution" | TrancheRole =="Development Bank" | TrancheRole =="Export Credit Agency" | TrancheRole =="Sub-underwriter" | TrancheRole == "Fund" | TrancheRole =="Paying agent" | TrancheRole == "Security trustee" | TrancheRole =="International Financial Institution"
{txt}(952 real changes made)

{com}. 
. //collapse allocation and lead arranger by transaction_loan_id bank_id 
. gen BankAllocation_pct = 100*LTAccreditedValuem/amount_trans_usdm
{txt}
{com}. replace BankAllocation_pct = . if BankAllocation_pct > 100
{txt}(4,712 real changes made, 4,712 to missing)

{com}. gcollapse (max) lead_bank (sum) BankAllocation_pct, by(transaction_loan_id BankID)
{res}{txt}{res}{txt}{res}{txt}
{com}. replace BankAllocation_pct = . if BankAllocation_pct == 0
{txt}(4,392 real changes made, 4,392 to missing)

{com}. 
. tempfile ijg_trans_lender 
{txt}
{com}. save `ijg_trans_lender'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000010{rm}
saved
as .dta format
{p_end}

{com}. 
. //append the two together
. use ../Intermediate/transaction_clean_loans, clear
{txt}
{com}. keep transaction_loan_id amount_trans_usdm
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. duplicates report transaction_loan_id

{p 0 4}{txt}Duplicates in terms of {res} transaction_loan_id{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}        {res}10350             0
{txt}{hline 10}{c BT}{hline 27}

{com}. tempfile size
{txt}
{com}. save `size'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000011{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use `ds_trans_lender', clear
{txt}
{com}. append using `ijg_trans_lender'
{txt}{p 0 7 2}
(variable
{bf:lead_bank} was {bf:byte}, now {bf:float} to accommodate using data's values)
{p_end}

{com}. 
. duplicates report transaction_loan_id BankID 

{p 0 4}{txt}Duplicates in terms of {res} transaction_loan_id BankID{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}        {res}67225             0
{txt}{hline 10}{c BT}{hline 27}

{com}. order transaction_loan_id BankID lead_bank BankAllocation_pct
{txt}
{com}. 
. //allocate deal size to banks using available info and pro-rata otherwise 
. merge m:1 transaction_loan_id using `size', keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          67,225{txt}  
{col 5}{hline 41}

{com}. 
. gen amount_trans_lender_usdm = (BankAllocation_pct/100)*amount_trans_usdm 
{txt}(4,392 missing values generated)

{com}. egen tot_allocation_frac = sum(BankAllocation_pct/100), by(transaction_loan_id)
{txt}
{com}. replace tot_allocation_frac = . if tot_allocation_frac >= 10
{txt}(15,226 real changes made, 15,226 to missing)

{com}. egen nmiss_alloc = sum(missing(BankAllocation_pct)), by(transaction_loan_id)
{txt}
{com}. replace amount_trans_lender_usdm = ((1-tot_allocation_frac)/nmiss_alloc)*amount_trans_usdm if missing(amount_trans_lender_usdm)
{txt}(4,392 real changes made)

{com}. drop amount_trans_usdm nmiss_alloc tot_allocation_frac
{txt}
{com}. 
. append using  `non_bank'
{txt}{p 0 7 2}
(variable
{bf:amount_trans_lender_usdm} was {bf:float}, now {bf:double} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:BankID} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{com}. merge m:1 BankID using ../Raw/Bank_Sample/BankSample_List, keep(1 3) nogen //Bring in Banknames
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             837
{txt}{col 9}from master{col 30}{res}             837{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          66,585{txt}  
{col 5}{hline 41}

{com}. 
. save ../Intermediate/transaction_lender_clean_loans, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/transaction_lender_clean_loans.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/transaction_lender_clean_loans.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. 
. {txt}
{com}. include "../Data_Cleaning/Build_Transaction_File_Bonds.do" 
{txt}
{com}. 
. ** BUILD OUT BOND ISSUANCE PANEL BY GCELPARENT YEAR
. 
. use "../Raw/psedo/clean_bonds_issued", clear
{txt}
{com}. tab type_of_security, sort

{txt}type_of_securit {c |}
              y {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
Medium-Term Nts {c |}{res}     76,444       12.43       12.43
{txt}Fxd/Straight Bd {c |}{res}     72,913       11.86       24.29
{txt}   Senior Bonds {c |}{res}     41,080        6.68       30.97
{txt}          Bonds {c |}{res}     30,558        4.97       35.94
{txt}             CP {c |}{res}     29,518        4.80       40.74
{txt}Coll Loan Oblig {c |}{res}     21,474        3.49       44.23
{txt}Asset Bkd Certs {c |}{res}     19,967        3.25       47.48
{txt}   Senior Notes {c |}{res}     17,526        2.85       50.33
{txt} Mdm-Trm Fl Nts {c |}{res}     17,424        2.83       53.16
{txt}Sr Unsecurd Nts {c |}{res}     12,196        1.98       55.15
{txt}  Gen Obl Bonds {c |}{res}     11,853        1.93       57.07
{txt}Sr Med Term Nts {c |}{res}     10,016        1.63       58.70
{txt}Gtd Mdm-Trm Nts {c |}{res}      9,475        1.54       60.24
{txt}  Revenue Bonds {c |}{res}      9,364        1.52       61.77
{txt} Collateral Bds {c |}{res}      8,482        1.38       63.15
{txt}Pass-Thru Certs {c |}{res}      8,476        1.38       64.53
{txt}   Global Notes {c |}{res}      8,275        1.35       65.87
{txt} Float Rate Nts {c |}{res}      8,046        1.31       67.18
{txt}    Step-Up MTN {c |}{res}      7,352        1.20       68.37
{txt}  Mtg Bkd Certs {c |}{res}      7,302        1.19       69.56
{txt} Unsecured Bond {c |}{res}      7,287        1.19       70.75
{txt}     Debentures {c |}{res}      7,158        1.16       71.91
{txt} Flt Rate Bonds {c |}{res}      6,659        1.08       72.99
{txt}Comm Mtg PT Crt {c |}{res}      6,609        1.07       74.07
{txt}    Global MTNs {c |}{res}      6,335        1.03       75.10
{txt}  Step-Up Bonds {c |}{res}      6,262        1.02       76.12
{txt}Flt Mtg Bkd Nts {c |}{res}      5,723        0.93       77.05
{txt}    Fxd Rte CDs {c |}{res}      5,720        0.93       77.98
{txt} Guaranteed Bds {c |}{res}      5,654        0.92       78.90
{txt}Asset Bkd Bonds {c |}{res}      5,393        0.88       79.78
{txt}          Notes {c |}{res}      5,350        0.87       80.65
{txt}Islamic Finance {c |}{res}      5,340        0.87       81.51
{txt}  St Enterprise {c |}{res}      5,094        0.83       82.34
{txt}   Global Bonds {c |}{res}      5,056        0.82       83.16
{txt}   Indexed MTNs {c |}{res}      4,797        0.78       83.94
{txt}  Mtg Bkd Bonds {c |}{res}      4,548        0.74       84.68
{txt}    Trust Certs {c |}{res}      4,403        0.72       85.40
{txt} Sr Secured Nts {c |}{res}      3,981        0.65       86.05
{txt} Debt, Pfd, Com {c |}{res}      3,296        0.54       86.58
{txt}  Zero Cpn MTNs {c |}{res}      3,137        0.51       87.09
{txt}   Subord Bonds {c |}{res}      2,734        0.44       87.54
{txt} Gtd Pass Certs {c |}{res}      2,511        0.41       87.95
{txt}Gtd Sr Unsec Nt {c |}{res}      2,435        0.40       88.34
{txt}   Sr Sec Bonds {c |}{res}      2,431        0.40       88.74
{txt} Float Rte Debs {c |}{res}      2,310        0.38       89.11
{txt} Gtd Part Certs {c |}{res}      2,276        0.37       89.48
{txt}   Gtd Sr Notes {c |}{res}      2,153        0.35       89.83
{txt}    Flt Rte CDs {c |}{res}      2,044        0.33       90.17
{txt}      FILP Bond {c |}{res}      1,968        0.32       90.49
{txt}Comm Mtg Flt PT {c |}{res}      1,962        0.32       90.81
{txt}Flt Rte Gtd MTN {c |}{res}      1,927        0.31       91.12
{txt}  Sr Flt Rt MTN {c |}{res}      1,865        0.30       91.42
{txt}    Serial Debs {c |}{res}      1,810        0.29       91.72
{txt} Gtd Global Nts {c |}{res}      1,788        0.29       92.01
{txt}Flt Rt Sr Bonds {c |}{res}      1,566        0.25       92.26
{txt}   Secured Debs {c |}{res}      1,549        0.25       92.51
{txt}  Gtd Sec Bonds {c |}{res}      1,482        0.24       92.76
{txt}Flt Ast-Bkd Nts {c |}{res}      1,362        0.22       92.98
{txt}Asset Backd Nts {c |}{res}      1,345        0.22       93.20
{txt}Dbt,Pfd,Dep,Com {c |}{res}      1,317        0.21       93.41
{txt}Mdm-Trm Sub Nts {c |}{res}      1,254        0.20       93.61
{txt}    Global FRNs {c |}{res}      1,235        0.20       93.81
{txt}Flt Ast-Bkd Cts {c |}{res}      1,208        0.20       94.01
{txt} Mtg-Backed Nts {c |}{res}      1,062        0.17       94.18
{txt}Debt,CvtDbt,Com {c |}{res}      1,052        0.17       94.35
{txt}  Preferred Shs {c |}{res}      1,014        0.16       94.52
{txt}  Fst Mtg Bonds {c |}{res}        992        0.16       94.68
{txt}Zero Coupon Bnd {c |}{res}        985        0.16       94.84
{txt}            CDs {c |}{res}        903        0.15       94.99
{txt}Flt Ast-Bkd Bds {c |}{res}        859        0.14       95.13
{txt}Lease Rev Bonds {c |}{res}        797        0.13       95.26
{txt}Gtd Secured Nts {c |}{res}        774        0.13       95.38
{txt}  Zero Cpn Debs {c |}{res}        758        0.12       95.51
{txt}      Sub Notes {c |}{res}        756        0.12       95.63
{txt}Gtd Sen Sec Nts {c |}{res}        748        0.12       95.75
{txt} Zero Coupon CD {c |}{res}        716        0.12       95.87
{txt}  Debt Sec, Com {c |}{res}        699        0.11       95.98
{txt}   Fix/Flt Bond {c |}{res}        682        0.11       96.09
{txt}    Subord Debs {c |}{res}        679        0.11       96.20
{txt}           Debt {c |}{res}        669        0.11       96.31
{txt}   Fix/Flt MTNs {c |}{res}        663        0.11       96.42
{txt}Fix/Flt Sub Bnd {c |}{res}        660        0.11       96.53
{txt}Pfd Stk,Com Stk {c |}{res}        610        0.10       96.63
{txt}  Indexed Bonds {c |}{res}        572        0.09       96.72
{txt} Preference Shs {c |}{res}        561        0.09       96.81
{txt}Gr Global Bonds {c |}{res}        558        0.09       96.90
{txt}Flt Rte Gtd Bds {c |}{res}        533        0.09       96.99
{txt}  Certs of Part {c |}{res}        527        0.09       97.07
{txt}   Secured MTNs {c |}{res}        518        0.08       97.16
{txt} Guaranteed Nts {c |}{res}        502        0.08       97.24
{txt}           BANs {c |}{res}        485        0.08       97.32
{txt}Cum Red Pfd Shs {c |}{res}        474        0.08       97.39
{txt}  Secured Notes {c |}{res}        420        0.07       97.46
{txt}Guaranteed Debs {c |}{res}        414        0.07       97.53
{txt}   Certificates {c |}{res}        381        0.06       97.59
{txt} Mdm-Trm Sr Nts {c |}{res}        364        0.06       97.65
{txt}Zero Cpn Sr Nts {c |}{res}        342        0.06       97.71
{txt}   Sr Sub Notes {c |}{res}        337        0.05       97.76
{txt}  Sr Unsec Debs {c |}{res}        330        0.05       97.82
{txt}    Flt Sub Bds {c |}{res}        304        0.05       97.87
{txt}  Secured Bonds {c |}{res}        301        0.05       97.91
{txt}Non-Cum Pref Sh {c |}{res}        300        0.05       97.96
{txt} Flt Senior Nts {c |}{res}        297        0.05       98.01
{txt}   Sr Flt Notes {c |}{res}        238        0.04       98.05
{txt}Flt Rte Gtd Nts {c |}{res}        235        0.04       98.09
{txt} JP Agency Bond {c |}{res}        231        0.04       98.13
{txt}  Sub Flt Notes {c |}{res}        231        0.04       98.16
{txt}FltMtg-BkdCerts {c |}{res}        230        0.04       98.20
{txt}Zero Cpn Gtd Bd {c |}{res}        219        0.04       98.24
{txt} Perp Sub Bonds {c |}{res}        217        0.04       98.27
{txt}  Deposit Notes {c |}{res}        215        0.03       98.31
{txt}Fix/Flt Rte Nts {c |}{res}        204        0.03       98.34
{txt}Sub Global Note {c |}{res}        203        0.03       98.37
{txt}   Med-Trm Debs {c |}{res}        202        0.03       98.41
{txt}  Gtd Sub Bonds {c |}{res}        194        0.03       98.44
{txt}  Reset Sub Nts {c |}{res}        179        0.03       98.47
{txt}   Serial Bonds {c |}{res}        173        0.03       98.49
{txt}Fix/Flt Guar.Bd {c |}{res}        157        0.03       98.52
{txt}Pfd,Com,Dep Shs {c |}{res}        155        0.03       98.55
{txt}Step-Up Sub Bds {c |}{res}        155        0.03       98.57
{txt}  Step-Down MTN {c |}{res}        154        0.03       98.60
{txt} Sr Sec Flt Nts {c |}{res}        148        0.02       98.62
{txt}    Senior Debs {c |}{res}        147        0.02       98.64
{txt} Var Rate Notes {c |}{res}        143        0.02       98.67
{txt} Perp FF Sub Bd {c |}{res}        137        0.02       98.69
{txt}     Bank Notes {c |}{res}        132        0.02       98.71
{txt}  Cum Preferred {c |}{res}        125        0.02       98.73
{txt}  Debt Sec, Pfd {c |}{res}        125        0.02       98.75
{txt}Flt Rate Bk Nts {c |}{res}        118        0.02       98.77
{txt}Cum Perp Pfd St {c |}{res}        115        0.02       98.79
{txt}Flt Student Nts {c |}{res}        103        0.02       98.81
{txt}   Zero Cpn Nts {c |}{res}        102        0.02       98.82
{txt}           OANs {c |}{res}        101        0.02       98.84
{txt}Flt Rte Dep Nts {c |}{res}        100        0.02       98.85
{txt}Flt Rte Sub Nts {c |}{res}        100        0.02       98.87
{txt}Flt Unsecurd Bd {c |}{res}        100        0.02       98.89
{txt}NonCum Pref Stk {c |}{res}        100        0.02       98.90
{txt}Step-Down Bonds {c |}{res}         98        0.02       98.92
{txt} Debt, Pfd, Ord {c |}{res}         97        0.02       98.94
{txt}Senior Bank Nts {c |}{res}         97        0.02       98.95
{txt}Bond w/Warrants {c |}{res}         96        0.02       98.97
{txt}  Gtd Sub Notes {c |}{res}         94        0.02       98.98
{txt}AstBkdNts,Certs {c |}{res}         87        0.01       99.00
{txt}      PIK Notes {c |}{res}         85        0.01       99.01
{txt} Extendible Nts {c |}{res}         84        0.01       99.02
{txt}   Gtd Sub MTNs {c |}{res}         84        0.01       99.04
{txt}Gtd Asst-Bkd Nt {c |}{res}         83        0.01       99.05
{txt}StepUp Call Nts {c |}{res}         83        0.01       99.06
{txt}    Global Debs {c |}{res}         82        0.01       99.08
{txt} Perp Sub Notes {c |}{res}         82        0.01       99.09
{txt}Step-Up Glbl Bd {c |}{res}         82        0.01       99.10
{txt} Equip Tr Certs {c |}{res}         81        0.01       99.12
{txt}Jr Subord Notes {c |}{res}         81        0.01       99.13
{txt}Sen Secured Dbs {c |}{res}         81        0.01       99.14
{txt}Flt Rt Secd Bds {c |}{res}         80        0.01       99.16
{txt}  Indexed Notes {c |}{res}         79        0.01       99.17
{txt}Flt Rte Sec Nts {c |}{res}         75        0.01       99.18
{txt}   Step-Up Debs {c |}{res}         75        0.01       99.19
{txt} Sub Bank Notes {c |}{res}         75        0.01       99.21
{txt}    Rdm Pfd Stk {c |}{res}         72        0.01       99.22
{txt}    Reset MTN's {c |}{res}         72        0.01       99.23
{txt} Depositary Shs {c |}{res}         71        0.01       99.24
{txt} Coll Flt Notes {c |}{res}         70        0.01       99.25
{txt}Gtd Sec FR Bond {c |}{res}         70        0.01       99.26
{txt} Promissory Nts {c |}{res}         69        0.01       99.28
{txt}    Cvt Pfd Shs {c |}{res}         68        0.01       99.29
{txt}    Sr Sub Bnds {c |}{res}         65        0.01       99.30
{txt}     Sr PIK Nts {c |}{res}         64        0.01       99.31
{txt}          Units {c |}{res}         64        0.01       99.32
{txt} FR MT Bank Nts {c |}{res}         63        0.01       99.33
{txt} Senior Sub MTN {c |}{res}         62        0.01       99.34
{txt}Class A Pfd Stk {c |}{res}         61        0.01       99.35
{txt} Infl Index Nts {c |}{res}         61        0.01       99.36
{txt}   Capital Secs {c |}{res}         57        0.01       99.37
{txt}  Euro MTN Prgm {c |}{res}         55        0.01       99.38
{txt}Pass-Thrus,Debt {c |}{res}         53        0.01       99.38
{txt}  Tax Rev Bonds {c |}{res}         52        0.01       99.39
{txt}  Sub Cap Notes {c |}{res}         51        0.01       99.40
{txt}Flt Rt Sec Debs {c |}{res}         50        0.01       99.41
{txt}   Perp Pfd Stk {c |}{res}         47        0.01       99.42
{txt}Trust Pfd Sec's {c |}{res}         46        0.01       99.42
{txt} Gtd Flt AB Nts {c |}{res}         45        0.01       99.43
{txt}  Step-Up Notes {c |}{res}         45        0.01       99.44
{txt}  Cum Ser A Pfd {c |}{res}         44        0.01       99.45
{txt}   Mtg Bkd MTNs {c |}{res}         43        0.01       99.45
{txt} Sink Fund Debs {c |}{res}         43        0.01       99.46
{txt}Convertible Nts {c |}{res}         42        0.01       99.47
{txt} Flt Sr Sec Nts {c |}{res}         42        0.01       99.47
{txt}  Gtd Mtg Notes {c |}{res}         42        0.01       99.48
{txt}    Step-Up FRN {c |}{res}         42        0.01       99.49
{txt}    Serial MTNs {c |}{res}         41        0.01       99.49
{txt}    Transfer CD {c |}{res}         39        0.01       99.50
{txt}F & Ref Mtg Bds {c |}{res}         37        0.01       99.51
{txt}  Surplus Notes {c |}{res}         36        0.01       99.51
{txt} Amortizing Nts {c |}{res}         35        0.01       99.52
{txt}Ind Fl Rate Nts {c |}{res}         35        0.01       99.52
{txt}Junior Sub Debs {c |}{res}         35        0.01       99.53
{txt}   Sub Debt,Pfd {c |}{res}         35        0.01       99.54
{txt} Mortgage Bonds {c |}{res}         34        0.01       99.54
{txt}Ast-Bk Term Nts {c |}{res}         33        0.01       99.55
{txt}    Senior Debt {c |}{res}         33        0.01       99.55
{txt}Sr Unsec Sub Nt {c |}{res}         33        0.01       99.56
{txt}Sen Sec Zero Cp {c |}{res}         32        0.01       99.56
{txt} Coll Trust Bds {c |}{res}         31        0.01       99.57
{txt}           RANs {c |}{res}         31        0.01       99.57
{txt} Global Ref Nts {c |}{res}         30        0.00       99.58
{txt}Gtd Senior Debs {c |}{res}         30        0.00       99.58
{txt}Flt Rate CD Nts {c |}{res}         29        0.00       99.59
{txt}       Gteed CD {c |}{res}         29        0.00       99.59
{txt} Sr Sec PIK Nts {c |}{res}         29        0.00       99.60
{txt}Zero Cpn Gtd Nt {c |}{res}         29        0.00       99.60
{txt}Loan Part Certs {c |}{res}         28        0.00       99.61
{txt}Ord/Common Shs. {c |}{res}         28        0.00       99.61
{txt}Sr Step-Up Note {c |}{res}         28        0.00       99.61
{txt}Sub Asset-Bk Ct {c |}{res}         28        0.00       99.62
{txt}G & R Mtg Bonds {c |}{res}         27        0.00       99.62
{txt} Gtd Sr Sub Nts {c |}{res}         27        0.00       99.63
{txt}    Retail MTNs {c |}{res}         27        0.00       99.63
{txt}Senior Amort Nt {c |}{res}         27        0.00       99.64
{txt}  Sr Flt Bk Nts {c |}{res}         27        0.00       99.64
{txt} Sub Stp-Up FRN {c |}{res}         27        0.00       99.65
{txt} Coll Mtg Oblig {c |}{res}         26        0.00       99.65
{txt}Fix/Flt Guar.Nt {c |}{res}         26        0.00       99.65
{txt}Flt Rte Ext Nts {c |}{res}         26        0.00       99.66
{txt}  Global Bk Nts {c |}{res}         26        0.00       99.66
{txt}Gtd Stp-Up Bnds {c |}{res}         25        0.00       99.67
{txt}    Ext Liq Sec {c |}{res}         24        0.00       99.67
{txt}Class B Pfd Stk {c |}{res}         23        0.00       99.67
{txt}Cvt Dbt Pfd Com {c |}{res}         23        0.00       99.68
{txt}First Mtg Notes {c |}{res}         23        0.00       99.68
{txt}Ln Style Bd Syn {c |}{res}         23        0.00       99.69
{txt}Step-Up Ast Bkd {c |}{res}         23        0.00       99.69
{txt}Flt Rt Gtd Debs {c |}{res}         22        0.00       99.69
{txt} Gtd Capped FRN {c |}{res}         22        0.00       99.70
{txt}FltAstBkdSubNts {c |}{res}         21        0.00       99.70
{txt} Perp Reset Nts {c |}{res}         21        0.00       99.70
{txt}Secured Sub Dbs {c |}{res}         21        0.00       99.71
{txt} Float Sub Debs {c |}{res}         20        0.00       99.71
{txt} Negotiable Obl {c |}{res}         20        0.00       99.71
{txt}    Trust Notes {c |}{res}         20        0.00       99.72
{txt}ZeroCpnIndexNts {c |}{res}         20        0.00       99.72
{txt}Collateral Debs {c |}{res}         19        0.00       99.72
{txt}  Gen'l Mtg Bds {c |}{res}         19        0.00       99.73
{txt} Mortgage Notes {c |}{res}         19        0.00       99.73
{txt}Gtd Step-Up Nts {c |}{res}         18        0.00       99.73
{txt}Non-Cum Cvt Pfd {c |}{res}         18        0.00       99.73
{txt}  Rec Backd Nts {c |}{res}         18        0.00       99.74
{txt}Extend Senr Nts {c |}{res}         17        0.00       99.74
{txt} Gtd Serial Nts {c |}{res}         17        0.00       99.74
{txt}Sub MT Bank Nts {c |}{res}         17        0.00       99.75
{txt}  Benchmark Nts {c |}{res}         16        0.00       99.75
{txt}  Capital Notes {c |}{res}         16        0.00       99.75
{txt} Collateral Nts {c |}{res}         16        0.00       99.75
{txt}  Cont Conv Con {c |}{res}         16        0.00       99.76
{txt}Perp Sub Stp Bd {c |}{res}         16        0.00       99.76
{txt}Red Cvt Pfd Stk {c |}{res}         16        0.00       99.76
{txt} Sub Prom Notes {c |}{res}         16        0.00       99.76
{txt} Transition Bds {c |}{res}         16        0.00       99.77
{txt}Convers Pfd Stk {c |}{res}         15        0.00       99.77
{txt}Dbt,Dep Pfd,Com {c |}{res}         15        0.00       99.77
{txt}Equity-Lnkd Nts {c |}{res}         15        0.00       99.77
{txt}Government Bond {c |}{res}         15        0.00       99.78
{txt}Gtd Capital Nts {c |}{res}         15        0.00       99.78
{txt}   Perp Sub FRN {c |}{res}         15        0.00       99.78
{txt}    Reset Notes {c |}{res}         15        0.00       99.78
{txt} Sec Prom Notes {c |}{res}         15        0.00       99.79
{txt}Sr Sb Reset Nts {c |}{res}         15        0.00       99.79
{txt}Mdm-Trm Ext Nts {c |}{res}         14        0.00       99.79
{txt} Mezzanine Debt {c |}{res}         14        0.00       99.79
{txt}Non-Cum Dep Pfd {c |}{res}         14        0.00       99.80
{txt}Red Ptg Pref Sh {c |}{res}         14        0.00       99.80
{txt}Cred Cd Pass Ct {c |}{res}         13        0.00       99.80
{txt}Ext Flt Rt Bond {c |}{res}         13        0.00       99.80
{txt} Loan Bkd Notes {c |}{res}         13        0.00       99.80
{txt}    Subord Debt {c |}{res}         13        0.00       99.81
{txt}           TANs {c |}{res}         13        0.00       99.81
{txt}            ADS {c |}{res}         12        0.00       99.81
{txt}Amortizing Debs {c |}{res}         12        0.00       99.81
{txt}Auct Rate Notes {c |}{res}         12        0.00       99.81
{txt}  Debt Sec, ADS {c |}{res}         12        0.00       99.82
{txt}       Gtd Debt {c |}{res}         12        0.00       99.82
{txt}    Gtd-Stp-FRN {c |}{res}         12        0.00       99.82
{txt}    MTN Program {c |}{res}         12        0.00       99.82
{txt}  Ser A Cvt Pfd {c |}{res}         12        0.00       99.82
{txt} Sr Holding Nts {c |}{res}         12        0.00       99.83
{txt}Step-Up Sub Nts {c |}{res}         12        0.00       99.83
{txt}Stp Gtd Sub Nts {c |}{res}         12        0.00       99.83
{txt}Cl A Cvt Pfd Sh {c |}{res}         11        0.00       99.83
{txt}Cvt Sub Res Nts {c |}{res}         11        0.00       99.83
{txt} Depositary Pfd {c |}{res}         11        0.00       99.84
{txt}Ext Flt Snr Nts {c |}{res}         11        0.00       99.84
{txt}   Sr Mtg Bonds {c |}{res}         11        0.00       99.84
{txt}Sr Sec Prior Nt {c |}{res}         11        0.00       99.84
{txt}Zero Cpn Global {c |}{res}         11        0.00       99.84
{txt}Convertible Bds {c |}{res}         10        0.00       99.84
{txt} Cvt Preference {c |}{res}         10        0.00       99.85
{txt}Flt Collat Debs {c |}{res}         10        0.00       99.85
{txt}Gtd Fst Mtg Nts {c |}{res}         10        0.00       99.85
{txt}    Gtd Sub FRN {c |}{res}         10        0.00       99.85
{txt}   RST-CAP-SECS {c |}{res}         10        0.00       99.85
{txt}     Senior Pfd {c |}{res}         10        0.00       99.85
{txt}   Series D Pfd {c |}{res}         10        0.00       99.86
{txt}  Sub Sec Notes {c |}{res}         10        0.00       99.86
{txt}          TRANs {c |}{res}         10        0.00       99.86
{txt} Tax Muni Bonds {c |}{res}         10        0.00       99.86
{txt}  Common Shares {c |}{res}          9        0.00       99.86
{txt}Dbt,Pfd,Dep Pfd {c |}{res}          9        0.00       99.86
{txt} Discount Notes {c |}{res}          9        0.00       99.86
{txt}Eq Nt Pass Cert {c |}{res}          9        0.00       99.87
{txt}Equipment Notes {c |}{res}          9        0.00       99.87
{txt}  Gas Fin Notes {c |}{res}          9        0.00       99.87
{txt}  Insured Notes {c |}{res}          9        0.00       99.87
{txt} Mdm-Trm Bk Nts {c |}{res}          9        0.00       99.87
{txt}     Part Certs {c |}{res}          9        0.00       99.87
{txt} Preferred Secs {c |}{res}          9        0.00       99.87
{txt}Prod Paymnt Fin {c |}{res}          9        0.00       99.88
{txt}  Sec Mtg Bonds {c |}{res}          9        0.00       99.88
{txt}Sr Discount Nts {c |}{res}          9        0.00       99.88
{txt}Sr Mtg Pass Crt {c |}{res}          9        0.00       99.88
{txt}     Term Notes {c |}{res}          9        0.00       99.88
{txt}  Auto Coll Bds {c |}{res}          8        0.00       99.88
{txt} Debt Sec Notes {c |}{res}          8        0.00       99.88
{txt}Debt,Cvt,Pfd,Cm {c |}{res}          8        0.00       99.89
{txt}Debt,Fst Mtg Bn {c |}{res}          8        0.00       99.89
{txt}Dir Oblig Notes {c |}{res}          8        0.00       99.89
{txt}Fst Priority Nt {c |}{res}          8        0.00       99.89
{txt}       Guar ETC {c |}{res}          8        0.00       99.89
{txt}Iss of Dbt Insr {c |}{res}          8        0.00       99.89
{txt}Mdm-Trm Dep Nts {c |}{res}          8        0.00       99.89
{txt}Secnd Prior Nts {c |}{res}          8        0.00       99.90
{txt} Second Sec Nts {c |}{res}          8        0.00       99.90
{txt}TRUPS-Trust Pfd {c |}{res}          8        0.00       99.90
{txt}    Cum Cvt Pfd {c |}{res}          7        0.00       99.90
{txt}Cum Perp Sr Pfd {c |}{res}          7        0.00       99.90
{txt}Cvt Debt,Common {c |}{res}          7        0.00       99.90
{txt} Cvt Senior Nts {c |}{res}          7        0.00       99.90
{txt}Dbt,Shs Ben Int {c |}{res}          7        0.00       99.90
{txt}Depositary Pref {c |}{res}          7        0.00       99.90
{txt} Flt Pass Thrgh {c |}{res}          7        0.00       99.91
{txt}Gtd Sub Cap Nts {c |}{res}          7        0.00       99.91
{txt}Gtd Sub Stp FRN {c |}{res}          7        0.00       99.91
{txt}Perp Flt Stp Bd {c |}{res}          7        0.00       99.91
{txt}    Power Notes {c |}{res}          7        0.00       99.91
{txt}   Serial Notes {c |}{res}          7        0.00       99.91
{txt}    Step-Up CDs {c |}{res}          7        0.00       99.91
{txt}  Sub Mtg Bonds {c |}{res}          7        0.00       99.91
{txt}Sub Var Rte Nts {c |}{res}          7        0.00       99.91
{txt}Zero Div Shares {c |}{res}          7        0.00       99.92
{txt}1st Mtg Bds,Com {c |}{res}          6        0.00       99.92
{txt} Asset-Bkd Debs {c |}{res}          6        0.00       99.92
{txt}Cred Cd Bkd Nts {c |}{res}          6        0.00       99.92
{txt}Cvt Secured Nts {c |}{res}          6        0.00       99.92
{txt}   Demand Notes {c |}{res}          6        0.00       99.92
{txt}F & Coll Mtg Bd {c |}{res}          6        0.00       99.92
{txt}  F&R Mtg Notes {c |}{res}          6        0.00       99.92
{txt} Flt Sb Cap Nts {c |}{res}          6        0.00       99.92
{txt} Flt Sr Sub Bds {c |}{res}          6        0.00       99.92
{txt}Gtd Amort Notes {c |}{res}          6        0.00       99.93
{txt}Gtd Step-Dwn Nt {c |}{res}          6        0.00       99.93
{txt} Jr Secured Nts {c |}{res}          6        0.00       99.93
{txt} Jr Sub Flt Nts {c |}{res}          6        0.00       99.93
{txt}   Junior Notes {c |}{res}          6        0.00       99.93
{txt}Ltd Rec Sr Secd {c |}{res}          6        0.00       99.93
{txt} Mdm-Trm CD Nts {c |}{res}          6        0.00       99.93
{txt}          PINES {c |}{res}          6        0.00       99.93
{txt}Senior Sub Debs {c |}{res}          6        0.00       99.93
{txt}    Sr Coll Nts {c |}{res}          6        0.00       99.93
{txt}Sr Sub Fl Rt Db {c |}{res}          6        0.00       99.94
{txt} Sr Sub Sec Nts {c |}{res}          6        0.00       99.94
{txt}Sr/Sub Mtg Pass {c |}{res}          6        0.00       99.94
{txt}   Sub Mtg Pass {c |}{res}          6        0.00       99.94
{txt}1st Mtg Bds Pfd {c |}{res}          5        0.00       99.94
{txt}   Cvt Loan Stk {c |}{res}          5        0.00       99.94
{txt}Flt Asset Tm Nt {c |}{res}          5        0.00       99.94
{txt}Global MTN Prgm {c |}{res}          5        0.00       99.94
{txt} Gold Index Nts {c |}{res}          5        0.00       99.94
{txt}Gtd Ship Fin Bd {c |}{res}          5        0.00       99.94
{txt}   Gtd Sub Debs {c |}{res}          5        0.00       99.94
{txt}Lev Lease Notes {c |}{res}          5        0.00       99.95
{txt}  Ltd Prtnr Int {c |}{res}          5        0.00       99.95
{txt}  Ltd Rec Notes {c |}{res}          5        0.00       99.95
{txt}Perp. Flt. Debs {c |}{res}          5        0.00       99.95
{txt}Senior Fund Nts {c |}{res}          5        0.00       99.95
{txt}Sink Fund Bonds {c |}{res}          5        0.00       99.95
{txt}  Sr Reset Debs {c |}{res}          5        0.00       99.95
{txt} Sr Sec Fst Pri {c |}{res}          5        0.00       99.95
{txt}    Sr/Sub MTNs {c |}{res}          5        0.00       99.95
{txt}1st Mtg Bds Stk {c |}{res}          4        0.00       99.95
{txt}Ast-Bkd Sub Deb {c |}{res}          4        0.00       99.95
{txt}Auction Pfd Shs {c |}{res}          4        0.00       99.95
{txt}       CD Notes {c |}{res}          4        0.00       99.95
{txt}   Capped FRN's {c |}{res}          4        0.00       99.95
{txt} Cvt Subord Nts {c |}{res}          4        0.00       99.96
{txt}Euro CP Program {c |}{res}          4        0.00       99.96
{txt}Fst Mtg Flt Nts {c |}{res}          4        0.00       99.96
{txt}Global Cvt Bond {c |}{res}          4        0.00       99.96
{txt}Gtd Export Cert {c |}{res}          4        0.00       99.96
{txt}Remic Pass-Thru {c |}{res}          4        0.00       99.96
{txt} Sr Reset Notes {c |}{res}          4        0.00       99.96
{txt}Sr Sub Disc Nts {c |}{res}          4        0.00       99.96
{txt}Step-Up Put Bds {c |}{res}          4        0.00       99.96
{txt}  Sub Mtg Notes {c |}{res}          4        0.00       99.96
{txt}  Capital Bonds {c |}{res}          3        0.00       99.96
{txt} Coll Mtg Bonds {c |}{res}          3        0.00       99.96
{txt}Cum Dpty Pfd St {c |}{res}          3        0.00       99.96
{txt}Cum Red Dep Pfd {c |}{res}          3        0.00       99.96
{txt} Deposity Rcpts {c |}{res}          3        0.00       99.96
{txt} Dual Cur Bonds {c |}{res}          3        0.00       99.96
{txt}   Equity Notes {c |}{res}          3        0.00       99.96
{txt}FOREX-Linked Bd {c |}{res}          3        0.00       99.97
{txt}Gtd Perp Flt Bd {c |}{res}          3        0.00       99.97
{txt}Gtd Pref Shares {c |}{res}          3        0.00       99.97
{txt}Gtd Red Pref Sh {c |}{res}          3        0.00       99.97
{txt}Gtd Step Up Flt {c |}{res}          3        0.00       99.97
{txt}Infrastruct Bds {c |}{res}          3        0.00       99.97
{txt}     InterNotes {c |}{res}          3        0.00       99.97
{txt}  Part Pref Shs {c |}{res}          3        0.00       99.97
{txt}   Pfd Cap Secs {c |}{res}          3        0.00       99.97
{txt}  Rev Ref Bonds {c |}{res}          3        0.00       99.97
{txt}        SATURNS {c |}{res}          3        0.00       99.97
{txt}Sen Sub Cap Nts {c |}{res}          3        0.00       99.97
{txt} Serial Sec Nts {c |}{res}          3        0.00       99.97
{txt}Sr/Sub Pass Thr {c |}{res}          3        0.00       99.97
{txt}  Step-Down FRN {c |}{res}          3        0.00       99.97
{txt}Step-Down Notes {c |}{res}          3        0.00       99.97
{txt}   Stp Security {c |}{res}          3        0.00       99.97
{txt} Sub Reset Debs {c |}{res}          3        0.00       99.97
{txt} Subord Cvt Bds {c |}{res}          3        0.00       99.97
{txt}        TARGETS {c |}{res}          3        0.00       99.97
{txt} Unsec Prom Nts {c |}{res}          3        0.00       99.97
{txt}Var Rte Dem Nts {c |}{res}          3        0.00       99.98
{txt}1st Mtg,MTN,Com {c |}{res}          2        0.00       99.98
{txt}1st Mtg,Pfd,Com {c |}{res}          2        0.00       99.98
{txt} Capital Shares {c |}{res}          2        0.00       99.98
{txt} Class C Shares {c |}{res}          2        0.00       99.98
{txt}Cum Red Pfd Ben {c |}{res}          2        0.00       99.98
{txt}Cvt Perpet. Pfd {c |}{res}          2        0.00       99.98
{txt} Cvt Sr Sub Nts {c |}{res}          2        0.00       99.98
{txt} Cvt Zero Bonds {c |}{res}          2        0.00       99.98
{txt} Debt, Cl B Com {c |}{res}          2        0.00       99.98
{txt} Debt,Benef Pfd {c |}{res}          2        0.00       99.98
{txt}Dep Cum Prt Pfd {c |}{res}          2        0.00       99.98
{txt}  First Pfd Shs {c |}{res}          2        0.00       99.98
{txt}Flt Infl In Nts {c |}{res}          2        0.00       99.98
{txt}Flt Rt Conv Deb {c |}{res}          2        0.00       99.98
{txt} Global Dep Shs {c |}{res}          2        0.00       99.98
{txt} Inv Flt Rt Nts {c |}{res}          2        0.00       99.98
{txt}Lease Bkd Notes {c |}{res}          2        0.00       99.98
{txt}    Listed Debs {c |}{res}          2        0.00       99.98
{txt}   Ltd Liab Int {c |}{res}          2        0.00       99.98
{txt}Med-Trm Fst Mtg {c |}{res}          2        0.00       99.98
{txt}  Money Mkt Pfd {c |}{res}          2        0.00       99.98
{txt}Nonrecourse Nts {c |}{res}          2        0.00       99.98
{txt}Pay-Through Nts {c |}{res}          2        0.00       99.98
{txt}  Project Bonds {c |}{res}          2        0.00       99.98
{txt}Prt Rdm Pref Sh {c |}{res}          2        0.00       99.98
{txt} Put/Call Notes {c |}{res}          2        0.00       99.98
{txt} Rst FR Sen Nts {c |}{res}          2        0.00       99.98
{txt} Second Mtg Nts {c |}{res}          2        0.00       99.98
{txt}Secured Sub Nts {c |}{res}          2        0.00       99.98
{txt}Ser B CumCvtPfd {c |}{res}          2        0.00       99.99
{txt}Ser B NonCum Pf {c |}{res}          2        0.00       99.99
{txt}Ser C Conv Pref {c |}{res}          2        0.00       99.99
{txt}Ser D Conv Pref {c |}{res}          2        0.00       99.99
{txt}Sr Flt MT Bk Nt {c |}{res}          2        0.00       99.99
{txt} Sr Ins Qrt Nts {c |}{res}          2        0.00       99.99
{txt} Sr MT Bank Nts {c |}{res}          2        0.00       99.99
{txt} Sr Subord Debt {c |}{res}          2        0.00       99.99
{txt} Sub Securities {c |}{res}          2        0.00       99.99
{txt}     Term Bonds {c |}{res}          2        0.00       99.99
{txt}   Var Rate CDs {c |}{res}          2        0.00       99.99
{txt}Var Rt Sub Debs {c |}{res}          2        0.00       99.99
{txt}          ZONES {c |}{res}          2        0.00       99.99
{txt}     Amort MTNS {c |}{res}          1        0.00       99.99
{txt}Amortizing FRNs {c |}{res}          1        0.00       99.99
{txt}  Annuity Bonds {c |}{res}          1        0.00       99.99
{txt}  Asset-Lnk-Nts {c |}{res}          1        0.00       99.99
{txt}Cap Protect Nts {c |}{res}          1        0.00       99.99
{txt}   Capital Unit {c |}{res}          1        0.00       99.99
{txt}Cl A Sub Vot Sh {c |}{res}          1        0.00       99.99
{txt} Coll Mtg Notes {c |}{res}          1        0.00       99.99
{txt}   Cvt Pfd Secs {c |}{res}          1        0.00       99.99
{txt}Cvt Sub Cap Nts {c |}{res}          1        0.00       99.99
{txt}Cvt Unsec Ln St {c |}{res}          1        0.00       99.99
{txt}Dbt,Cap Stk,Pfd {c |}{res}          1        0.00       99.99
{txt}Deep Disc Bonds {c |}{res}          1        0.00       99.99
{txt}           ELKS {c |}{res}          1        0.00       99.99
{txt} Equip Tr Notes {c |}{res}          1        0.00       99.99
{txt}Exch Pd Cap Sec {c |}{res}          1        0.00       99.99
{txt}Exchangeable Nt {c |}{res}          1        0.00       99.99
{txt}Ext Fst Mtg Bds {c |}{res}          1        0.00       99.99
{txt} Extendible Bds {c |}{res}          1        0.00       99.99
{txt}Flt Lease Certs {c |}{res}          1        0.00       99.99
{txt}FltRt TrustCert {c |}{res}          1        0.00       99.99
{txt}Fst Mtg Deb Stk {c |}{res}          1        0.00       99.99
{txt}Gov Trust Certs {c |}{res}          1        0.00       99.99
{txt} Gtd Exch Notes {c |}{res}          1        0.00       99.99
{txt} Gtd Sr Sec Cvt {c |}{res}          1        0.00       99.99
{txt}Guar Trust Cert {c |}{res}          1        0.00       99.99
{txt} Income Dep Sec {c |}{res}          1        0.00       99.99
{txt}   Income Notes {c |}{res}          1        0.00       99.99
{txt} Indexed Sr Nts {c |}{res}          1        0.00       99.99
{txt}Indexed Sub Nts {c |}{res}          1        0.00       99.99
{txt} Investor Notes {c |}{res}          1        0.00       99.99
{txt}LIBOR Accrl Nts {c |}{res}          1        0.00       99.99
{txt}Mthly In Snr Nt {c |}{res}          1        0.00       99.99
{txt}    Notes, Debs {c |}{res}          1        0.00       99.99
{txt}Ordinary Shares {c |}{res}          1        0.00       99.99
{txt}    PIK Pfd Stk {c |}{res}          1        0.00       99.99
{txt}Perp Cvt Sub Bd {c |}{res}          1        0.00      100.00
{txt}Perp StepUp Cap {c |}{res}          1        0.00      100.00
{txt}Perp Sub SU FRN {c |}{res}          1        0.00      100.00
{txt} Pmnt Ind Notes {c |}{res}          1        0.00      100.00
{txt}    REMIC Bonds {c |}{res}          1        0.00      100.00
{txt}           REPS {c |}{res}          1        0.00      100.00
{txt}Rdm Fst Pfd Stk {c |}{res}          1        0.00      100.00
{txt} Redeem Sub Deb {c |}{res}          1        0.00      100.00
{txt}    Reverse FRN {c |}{res}          1        0.00      100.00
{txt}Senior Prom Nts {c |}{res}          1        0.00      100.00
{txt}Ser E Conv Pref {c |}{res}          1        0.00      100.00
{txt}Ser G Conv Pref {c |}{res}          1        0.00      100.00
{txt}    Sr Exch Nts {c |}{res}          1        0.00      100.00
{txt}Sr Extend Notes {c |}{res}          1        0.00      100.00
{txt} Sr Sec Cvt Nts {c |}{res}          1        0.00      100.00
{txt}Sr Sec Ln Certs {c |}{res}          1        0.00      100.00
{txt}Sr Sec Reset Nt {c |}{res}          1        0.00      100.00
{txt}Sr Secd Disc Nt {c |}{res}          1        0.00      100.00
{txt} Sr Sink Fd Nts {c |}{res}          1        0.00      100.00
{txt}Sr Var Rate Nts {c |}{res}          1        0.00      100.00
{txt}         Steers {c |}{res}          1        0.00      100.00
{txt}Stp-Up Sr Sub N {c |}{res}          1        0.00      100.00
{txt} Sub CMT Flt Rt {c |}{res}          1        0.00      100.00
{txt}      Sub Certs {c |}{res}          1        0.00      100.00
{txt}Sub Revenue Bds {c |}{res}          1        0.00      100.00
{txt}Tax Ex VD Notes {c |}{res}          1        0.00      100.00
{txt} Trust Receipts {c |}{res}          1        0.00      100.00
{txt}    Trust Units {c |}{res}          1        0.00      100.00
{txt} Var Tm Pfd Stk {c |}{res}          1        0.00      100.00
{txt}       Warrants {c |}{res}          1        0.00      100.00
{txt}ZeroCpnSrSubNts {c |}{res}          1        0.00      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}    614,902      100.00
{txt}
{com}. 
. //cut down bond issuance to GCEL issuers
. joinby companyid using ../Raw/SDC/sdc_gcel_company_link.dta
{txt}
{com}. keep if ~missing(GCELcompanyID) //limit to GCEL Sample
{txt}(598,298 observations deleted)

{com}. 
.  //clean security type
. tab type_of_security, sort 

{txt}type_of_securit {c |}
              y {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
Medium-Term Nts {c |}{res}      2,059       12.30       12.30
{txt}Fxd/Straight Bd {c |}{res}      1,974       11.79       24.08
{txt}   Senior Bonds {c |}{res}      1,121        6.69       30.78
{txt}          Bonds {c |}{res}        822        4.91       35.69
{txt}             CP {c |}{res}        769        4.59       40.28
{txt}Coll Loan Oblig {c |}{res}        617        3.68       43.97
{txt}Asset Bkd Certs {c |}{res}        530        3.17       47.13
{txt}   Senior Notes {c |}{res}        500        2.99       50.12
{txt} Mdm-Trm Fl Nts {c |}{res}        471        2.81       52.93
{txt}  Gen Obl Bonds {c |}{res}        358        2.14       55.07
{txt}Sr Unsecurd Nts {c |}{res}        320        1.91       56.98
{txt}Sr Med Term Nts {c |}{res}        273        1.63       58.61
{txt}  Revenue Bonds {c |}{res}        266        1.59       60.20
{txt}   Global Notes {c |}{res}        254        1.52       61.71
{txt}Gtd Mdm-Trm Nts {c |}{res}        243        1.45       63.17
{txt} Collateral Bds {c |}{res}        228        1.36       64.53
{txt} Float Rate Nts {c |}{res}        218        1.30       65.83
{txt} Unsecured Bond {c |}{res}        209        1.25       67.08
{txt}Pass-Thru Certs {c |}{res}        203        1.21       68.29
{txt}    Step-Up MTN {c |}{res}        201        1.20       69.49
{txt}     Debentures {c |}{res}        200        1.19       70.68
{txt} Flt Rate Bonds {c |}{res}        189        1.13       71.81
{txt}  Mtg Bkd Certs {c |}{res}        188        1.12       72.94
{txt}Comm Mtg PT Crt {c |}{res}        181        1.08       74.02
{txt}    Global MTNs {c |}{res}        159        0.95       74.97
{txt}Flt Mtg Bkd Nts {c |}{res}        156        0.93       75.90
{txt} Guaranteed Bds {c |}{res}        155        0.93       76.82
{txt}  Step-Up Bonds {c |}{res}        150        0.90       77.72
{txt}    Fxd Rte CDs {c |}{res}        146        0.87       78.59
{txt}Islamic Finance {c |}{res}        146        0.87       79.46
{txt}   Global Bonds {c |}{res}        145        0.87       80.33
{txt}Asset Bkd Bonds {c |}{res}        143        0.85       81.18
{txt}          Notes {c |}{res}        142        0.85       82.03
{txt}  St Enterprise {c |}{res}        127        0.76       82.79
{txt}   Indexed MTNs {c |}{res}        120        0.72       83.51
{txt} Sr Secured Nts {c |}{res}        117        0.70       84.20
{txt}    Trust Certs {c |}{res}        116        0.69       84.90
{txt}  Mtg Bkd Bonds {c |}{res}        115        0.69       85.58
{txt}  Zero Cpn MTNs {c |}{res}         91        0.54       86.13
{txt} Debt, Pfd, Com {c |}{res}         87        0.52       86.65
{txt} Gtd Part Certs {c |}{res}         77        0.46       87.11
{txt}Gtd Sr Unsec Nt {c |}{res}         75        0.45       87.55
{txt}   Subord Bonds {c |}{res}         70        0.42       87.97
{txt}Comm Mtg Flt PT {c |}{res}         66        0.39       88.37
{txt}    Flt Rte CDs {c |}{res}         65        0.39       88.75
{txt}   Sr Sec Bonds {c |}{res}         65        0.39       89.14
{txt} Gtd Global Nts {c |}{res}         58        0.35       89.49
{txt}   Gtd Sr Notes {c |}{res}         56        0.33       89.82
{txt}  Sr Flt Rt MTN {c |}{res}         55        0.33       90.15
{txt}Flt Rte Gtd MTN {c |}{res}         54        0.32       90.47
{txt} Gtd Pass Certs {c |}{res}         54        0.32       90.80
{txt}Flt Rt Sr Bonds {c |}{res}         50        0.30       91.10
{txt}    Serial Debs {c |}{res}         48        0.29       91.38
{txt}Flt Ast-Bkd Nts {c |}{res}         45        0.27       91.65
{txt} Float Rte Debs {c |}{res}         44        0.26       91.91
{txt}   Secured Debs {c |}{res}         43        0.26       92.17
{txt}Asset Backd Nts {c |}{res}         42        0.25       92.42
{txt}      FILP Bond {c |}{res}         39        0.23       92.65
{txt}  Preferred Shs {c |}{res}         36        0.21       92.87
{txt}    Global FRNs {c |}{res}         35        0.21       93.08
{txt}Mdm-Trm Sub Nts {c |}{res}         35        0.21       93.29
{txt}Dbt,Pfd,Dep,Com {c |}{res}         34        0.20       93.49
{txt}Flt Ast-Bkd Cts {c |}{res}         34        0.20       93.69
{txt}Debt,CvtDbt,Com {c |}{res}         33        0.20       93.89
{txt}      Sub Notes {c |}{res}         32        0.19       94.08
{txt} Mtg-Backed Nts {c |}{res}         31        0.19       94.27
{txt}  Gtd Sec Bonds {c |}{res}         30        0.18       94.45
{txt}            CDs {c |}{res}         28        0.17       94.61
{txt}  Fst Mtg Bonds {c |}{res}         28        0.17       94.78
{txt}Gtd Secured Nts {c |}{res}         28        0.17       94.95
{txt}Zero Coupon Bnd {c |}{res}         27        0.16       95.11
{txt}Flt Ast-Bkd Bds {c |}{res}         25        0.15       95.26
{txt}Lease Rev Bonds {c |}{res}         24        0.14       95.40
{txt}  Debt Sec, Com {c |}{res}         23        0.14       95.54
{txt}Pfd Stk,Com Stk {c |}{res}         22        0.13       95.67
{txt}           Debt {c |}{res}         21        0.13       95.80
{txt}    Subord Debs {c |}{res}         21        0.13       95.92
{txt}Gr Global Bonds {c |}{res}         19        0.11       96.03
{txt}  Indexed Bonds {c |}{res}         18        0.11       96.14
{txt} Preference Shs {c |}{res}         18        0.11       96.25
{txt}   Fix/Flt Bond {c |}{res}         17        0.10       96.35
{txt}   Fix/Flt MTNs {c |}{res}         17        0.10       96.45
{txt}  Zero Cpn Debs {c |}{res}         17        0.10       96.55
{txt}  Certs of Part {c |}{res}         16        0.10       96.65
{txt}Cum Red Pfd Shs {c |}{res}         16        0.10       96.75
{txt}Flt Rte Gtd Nts {c |}{res}         16        0.10       96.84
{txt}           BANs {c |}{res}         15        0.09       96.93
{txt}Fix/Flt Sub Bnd {c |}{res}         13        0.08       97.01
{txt} Guaranteed Nts {c |}{res}         13        0.08       97.09
{txt}   Sr Sub Notes {c |}{res}         13        0.08       97.16
{txt} Zero Coupon CD {c |}{res}         13        0.08       97.24
{txt}    Flt Sub Bds {c |}{res}         12        0.07       97.31
{txt}Gtd Sen Sec Nts {c |}{res}         12        0.07       97.38
{txt} Mdm-Trm Sr Nts {c |}{res}         12        0.07       97.46
{txt}   Certificates {c |}{res}         11        0.07       97.52
{txt}Flt Rte Gtd Bds {c |}{res}         11        0.07       97.59
{txt}Guaranteed Debs {c |}{res}         11        0.07       97.65
{txt} JP Agency Bond {c |}{res}         11        0.07       97.72
{txt}   Sr Flt Notes {c |}{res}         10        0.06       97.78
{txt}  Sr Unsec Debs {c |}{res}         10        0.06       97.84
{txt}Non-Cum Pref Sh {c |}{res}          9        0.05       97.89
{txt}Zero Cpn Sr Nts {c |}{res}          9        0.05       97.95
{txt}      PIK Notes {c |}{res}          8        0.05       97.99
{txt}   Secured MTNs {c |}{res}          8        0.05       98.04
{txt}  Secured Notes {c |}{res}          8        0.05       98.09
{txt}Zero Cpn Gtd Bd {c |}{res}          8        0.05       98.14
{txt}  Secured Bonds {c |}{res}          7        0.04       98.18
{txt} Coll Flt Notes {c |}{res}          6        0.04       98.21
{txt}Flt Rate Bk Nts {c |}{res}          6        0.04       98.25
{txt}FltMtg-BkdCerts {c |}{res}          6        0.04       98.29
{txt}Pfd,Com,Dep Shs {c |}{res}          6        0.04       98.32
{txt}   Serial Bonds {c |}{res}          6        0.04       98.36
{txt}  Sub Flt Notes {c |}{res}          6        0.04       98.39
{txt}Sub Global Note {c |}{res}          6        0.04       98.43
{txt}   Zero Cpn Nts {c |}{res}          6        0.04       98.47
{txt}  Debt Sec, Pfd {c |}{res}          5        0.03       98.50
{txt}Fix/Flt Guar.Bd {c |}{res}          5        0.03       98.52
{txt}Fix/Flt Rte Nts {c |}{res}          5        0.03       98.55
{txt} Flt Senior Nts {c |}{res}          5        0.03       98.58
{txt}Flt Unsecurd Bd {c |}{res}          5        0.03       98.61
{txt}Gtd Sec FR Bond {c |}{res}          5        0.03       98.64
{txt} Perp Sub Bonds {c |}{res}          5        0.03       98.67
{txt}    Reset MTN's {c |}{res}          5        0.03       98.70
{txt}Sen Secured Dbs {c |}{res}          5        0.03       98.73
{txt}Step-Up Glbl Bd {c |}{res}          5        0.03       98.76
{txt}Cum Perp Pfd St {c |}{res}          4        0.02       98.79
{txt}  Cum Preferred {c |}{res}          4        0.02       98.81
{txt}Fix/Flt Guar.Nt {c |}{res}          4        0.02       98.84
{txt}  Gtd Sub Bonds {c |}{res}          4        0.02       98.86
{txt} Perp FF Sub Bd {c |}{res}          4        0.02       98.88
{txt}  Reset Sub Nts {c |}{res}          4        0.02       98.91
{txt}    Senior Debs {c |}{res}          4        0.02       98.93
{txt} Sr Sec Flt Nts {c |}{res}          4        0.02       98.95
{txt} Sub Bank Notes {c |}{res}          4        0.02       98.98
{txt} Var Rate Notes {c |}{res}          4        0.02       99.00
{txt}  Cum Ser A Pfd {c |}{res}          3        0.02       99.02
{txt} FR MT Bank Nts {c |}{res}          3        0.02       99.04
{txt}Flt Rte Dep Nts {c |}{res}          3        0.02       99.06
{txt}Flt Student Nts {c |}{res}          3        0.02       99.07
{txt} Global Ref Nts {c |}{res}          3        0.02       99.09
{txt}  Indexed Notes {c |}{res}          3        0.02       99.11
{txt}Red Ptg Pref Sh {c |}{res}          3        0.02       99.13
{txt}Senior Bank Nts {c |}{res}          3        0.02       99.15
{txt}Sr Unsec Sub Nt {c |}{res}          3        0.02       99.16
{txt}  Step-Down MTN {c |}{res}          3        0.02       99.18
{txt}   Step-Up Debs {c |}{res}          3        0.02       99.20
{txt}    Cvt Pfd Shs {c |}{res}          2        0.01       99.21
{txt} Depositary Shs {c |}{res}          2        0.01       99.22
{txt}Equity-Lnkd Nts {c |}{res}          2        0.01       99.24
{txt}  Euro MTN Prgm {c |}{res}          2        0.01       99.25
{txt}Flt Rte Sec Nts {c |}{res}          2        0.01       99.26
{txt}Flt Rte Sub Nts {c |}{res}          2        0.01       99.27
{txt}G & R Mtg Bonds {c |}{res}          2        0.01       99.28
{txt}    Global Debs {c |}{res}          2        0.01       99.30
{txt}Gtd Asst-Bkd Nt {c |}{res}          2        0.01       99.31
{txt} Gtd Sr Sub Nts {c |}{res}          2        0.01       99.32
{txt}Lease Bkd Notes {c |}{res}          2        0.01       99.33
{txt}   Med-Trm Debs {c |}{res}          2        0.01       99.34
{txt} Promissory Nts {c |}{res}          2        0.01       99.36
{txt}    Rdm Pfd Stk {c |}{res}          2        0.01       99.37
{txt}Red Cvt Pfd Stk {c |}{res}          2        0.01       99.38
{txt}    Senior Debt {c |}{res}          2        0.01       99.39
{txt}    Serial MTNs {c |}{res}          2        0.01       99.40
{txt}   Serial Notes {c |}{res}          2        0.01       99.41
{txt}     Sr PIK Nts {c |}{res}          2        0.01       99.43
{txt} Sr Sec PIK Nts {c |}{res}          2        0.01       99.44
{txt}    Sr Sub Bnds {c |}{res}          2        0.01       99.45
{txt}StepUp Call Nts {c |}{res}          2        0.01       99.46
{txt} Sub Stp-Up FRN {c |}{res}          2        0.01       99.47
{txt}  Tax Rev Bonds {c |}{res}          2        0.01       99.49
{txt}ZeroCpnIndexNts {c |}{res}          2        0.01       99.50
{txt}1st Mtg Bds Stk {c |}{res}          1        0.01       99.50
{txt}Amortizing Debs {c |}{res}          1        0.01       99.51
{txt}Ast-Bk Term Nts {c |}{res}          1        0.01       99.52
{txt}Ast-Bkd Sub Deb {c |}{res}          1        0.01       99.52
{txt}     Bank Notes {c |}{res}          1        0.01       99.53
{txt}Bond w/Warrants {c |}{res}          1        0.01       99.53
{txt}  Capital Notes {c |}{res}          1        0.01       99.54
{txt}   Capital Secs {c |}{res}          1        0.01       99.55
{txt}Class A Pfd Stk {c |}{res}          1        0.01       99.55
{txt} Coll Mtg Oblig {c |}{res}          1        0.01       99.56
{txt}  Cont Conv Con {c |}{res}          1        0.01       99.56
{txt}Convers Pfd Stk {c |}{res}          1        0.01       99.57
{txt}Cvt Dbt Pfd Com {c |}{res}          1        0.01       99.58
{txt} Debt, Pfd, Ord {c |}{res}          1        0.01       99.58
{txt}Debt,Cvt,Pfd,Cm {c |}{res}          1        0.01       99.59
{txt}  Deposit Notes {c |}{res}          1        0.01       99.59
{txt} Depositary Pfd {c |}{res}          1        0.01       99.60
{txt} Discount Notes {c |}{res}          1        0.01       99.61
{txt} Equip Tr Certs {c |}{res}          1        0.01       99.61
{txt}Ext Flt Rt Bond {c |}{res}          1        0.01       99.62
{txt}Extend Senr Nts {c |}{res}          1        0.01       99.62
{txt}F & Ref Mtg Bds {c |}{res}          1        0.01       99.63
{txt} Float Sub Debs {c |}{res}          1        0.01       99.64
{txt}Flt Asset Tm Nt {c |}{res}          1        0.01       99.64
{txt} Flt Pass Thrgh {c |}{res}          1        0.01       99.65
{txt}Flt Rate CD Nts {c |}{res}          1        0.01       99.65
{txt}Flt Rt Sec Debs {c |}{res}          1        0.01       99.66
{txt}Flt Rt Secd Bds {c |}{res}          1        0.01       99.67
{txt} Flt Sr Sub Bds {c |}{res}          1        0.01       99.67
{txt}  Gen'l Mtg Bds {c |}{res}          1        0.01       99.68
{txt}  Global Bk Nts {c |}{res}          1        0.01       99.68
{txt} Global Dep Shs {c |}{res}          1        0.01       99.69
{txt}Gtd Capital Nts {c |}{res}          1        0.01       99.70
{txt} Gtd Capped FRN {c |}{res}          1        0.01       99.70
{txt} Gtd Flt AB Nts {c |}{res}          1        0.01       99.71
{txt}  Gtd Mtg Notes {c |}{res}          1        0.01       99.71
{txt} Gtd Serial Nts {c |}{res}          1        0.01       99.72
{txt}Gtd Step-Up Nts {c |}{res}          1        0.01       99.73
{txt}   Gtd Sub MTNs {c |}{res}          1        0.01       99.73
{txt}  Gtd Sub Notes {c |}{res}          1        0.01       99.74
{txt}       Guar ETC {c |}{res}          1        0.01       99.74
{txt}Ind Fl Rate Nts {c |}{res}          1        0.01       99.75
{txt} Infl Index Nts {c |}{res}          1        0.01       99.76
{txt}Jr Subord Notes {c |}{res}          1        0.01       99.76
{txt}Ln Style Bd Syn {c |}{res}          1        0.01       99.77
{txt} Loan Bkd Notes {c |}{res}          1        0.01       99.77
{txt} Mdm-Trm CD Nts {c |}{res}          1        0.01       99.78
{txt} Mortgage Bonds {c |}{res}          1        0.01       99.79
{txt}Mthly In Snr Nt {c |}{res}          1        0.01       99.79
{txt} Negotiable Obl {c |}{res}          1        0.01       99.80
{txt}Non-Cum Cvt Pfd {c |}{res}          1        0.01       99.80
{txt}Non-Cum Dep Pfd {c |}{res}          1        0.01       99.81
{txt}NonCum Pref Stk {c |}{res}          1        0.01       99.81
{txt}           OANs {c |}{res}          1        0.01       99.82
{txt}Pass-Thrus,Debt {c |}{res}          1        0.01       99.83
{txt}   Perp Pfd Stk {c |}{res}          1        0.01       99.83
{txt}Perp Sub Stp Bd {c |}{res}          1        0.01       99.84
{txt}Prt Rdm Pref Sh {c |}{res}          1        0.01       99.84
{txt}    Retail MTNs {c |}{res}          1        0.01       99.85
{txt} Sec Prom Notes {c |}{res}          1        0.01       99.86
{txt}Secured Sub Dbs {c |}{res}          1        0.01       99.86
{txt}Sen Sec Zero Cp {c |}{res}          1        0.01       99.87
{txt}Senior Amort Nt {c |}{res}          1        0.01       99.87
{txt} Sink Fund Debs {c |}{res}          1        0.01       99.88
{txt}Sr Mtg Pass Crt {c |}{res}          1        0.01       99.89
{txt}Sr Sb Reset Nts {c |}{res}          1        0.01       99.89
{txt}Sr Sec Prior Nt {c |}{res}          1        0.01       99.90
{txt}Sr Step-Up Note {c |}{res}          1        0.01       99.90
{txt}Sr/Sub Pass Thr {c |}{res}          1        0.01       99.91
{txt}Step-Down Notes {c |}{res}          1        0.01       99.92
{txt}Step-Up Ast Bkd {c |}{res}          1        0.01       99.92
{txt}    Step-Up CDs {c |}{res}          1        0.01       99.93
{txt}    Step-Up FRN {c |}{res}          1        0.01       99.93
{txt}  Step-Up Notes {c |}{res}          1        0.01       99.94
{txt}Step-Up Sub Bds {c |}{res}          1        0.01       99.95
{txt}Sub Asset-Bk Ct {c |}{res}          1        0.01       99.95
{txt}  Sub Cap Notes {c |}{res}          1        0.01       99.96
{txt} Sub Prom Notes {c |}{res}          1        0.01       99.96
{txt}  Sub Sec Notes {c |}{res}          1        0.01       99.97
{txt}    Subord Debt {c |}{res}          1        0.01       99.98
{txt}  Surplus Notes {c |}{res}          1        0.01       99.98
{txt}          Units {c |}{res}          1        0.01       99.99
{txt}Zero Div Shares {c |}{res}          1        0.01       99.99
{txt}ZeroCpnSrSubNts {c |}{res}          1        0.01      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}     16,745      100.00
{txt}
{com}. 
. gen security_type_clean = "CP" if type_of_security == "CP"
{txt}(15,976 missing values generated)

{com}. replace security_type_clean = "Secured Bond" if inlist(type_of_security,"Secured Bonds","Sr Sec Bonds","Secured Debs","Sr Secured Nts","Debt Sec, Com","Debt Sec, Pfd","Gtd Sen Sec Nts")
{txt}variable {bf}{res}security_type_clean{sf}{txt} was {bf}{res}str2{sf}{txt} now {bf}{res}str12{sf}
{txt}(272 real changes made)

{com}. replace security_type_clean = "MTN" if inlist(type_of_security,"Med-Trm Debs","Medium-Term Nts","Sr Med Term Nts","Gtd Mdm-Trm Nts","Mdm-Trm Fl Nts","Serial MTNs")
{txt}(3,050 real changes made)

{com}. replace security_type_clean = "MTN" if regexm(type_of_security,"MTN")
{txt}(717 real changes made)

{com}. replace security_type_clean = "Med-Trm" if regexm(type_of_security,"MTN")
{txt}(719 real changes made)

{com}. replace security_type_clean = "Note" if (regexm(type_of_security,"Nt") |regexm(type_of_security,"Notes")) & security_type_clean == ""
{txt}(2,212 real changes made)

{com}. replace security_type_clean = "Other" if inlist(type_of_security,"Islamic Finance","Preferred Shs","Preference Shs")
{txt}(200 real changes made)

{com}. replace security_type_clean = "Other" if regexm(type_of_security,"Shs")
{txt}(27 real changes made)

{com}. replace security_type_clean = "Other" if regexm(type_of_security,"Stk")
{txt}(31 real changes made)

{com}. replace security_type_clean = "Bond" if missing(security_type_clean)
{txt}(9,467 real changes made)

{com}. 
. //merge in borrower_id
. rename GCELParentID ParentID_GCEL 
{res}{txt}
{com}. merge m:1 ParentID_GCEL using ../Intermediate/borrower_file, keepusing(borrower_id) 
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             630
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}             630{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          16,745{txt}  (_merge==3)
{col 5}{hline 41}

{com}. order borrower_id
{txt}
{com}. drop ParentID_GCEL
{txt}
{com}. drop if missing(sdc_id)
{txt}(630 observations deleted)

{com}. 
. keep borrower_id sdc_id principal_amt issue_date security_type_clean coupon
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(295 observations deleted)

{com}. 
. //clean up file
. egen transaction_bond_id = group(sdc_id)
{txt}
{com}. rename principal_amt amount_trans_usdm 
{res}{txt}
{com}. rename issue_date date_trans 
{res}{txt}
{com}. rename security_type_clean debt_type
{res}{txt}
{com}. 
. order borrower_id transaction_bond_id sdc_id date_trans amount_trans_usdm debt_type coupon 
{txt}
{com}. compress
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}transaction_bond_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
{txt}  (65,800 bytes saved)

{com}. save ../Intermediate/transaction_clean_bonds, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/transaction_clean_bonds.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/transaction_clean_bonds.dta{rm}
saved
{p_end}

{com}. 
. //get number of bookrunners per bond issue
. use ../Raw/SDC/clean_bonds_bookrunners_name, clear
{txt}
{com}. gegen n_bookrunners_sdc = nvals(bookrunner), by(sdc_id)
{txt}nvals() is not a gtools function; will hash and use egen
{res}{txt}{res}{txt}
{com}. keep sdc_id n_bookrunners_sdc
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(550,388 observations deleted)

{com}. //cut to gcel sample 
. merge 1:m sdc_id using ../Intermediate/transaction_clean_bonds, keepusing(sdc_id) keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          15,832{txt}  
{col 5}{hline 41}

{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(411 observations deleted)

{com}. tempfile nbrs 
{txt}
{com}. save `nbrs'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000012{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. //final build of transaction lender file
. use ../Intermediate/transaction_clean_bonds, clear
{txt}
{com}. drop borrower_id
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(433 observations deleted)

{com}. merge 1:1 sdc_id using `nbrs', keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             596
{txt}{col 9}from master{col 30}{res}             596{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          15,421{txt}  
{col 5}{hline 41}

{com}. replace n_bookrunners_sdc = 0 if missing(n_bookrunners_sdc)
{txt}(596 real changes made)

{com}. joinby sdc_id using "../Raw/SDC/SDC_Bank_Main_Bank", unmatched(master)
{txt}
{com}. drop bookrunner name name_id
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(147 observations deleted)

{com}. tab _merge 

                       {txt}_merge {c |}      Freq.     Percent        Cum.
{hline 30}{c +}{hline 35}
          only in master data {c |}{res}     15,599       95.05       95.05
{txt}both in master and using data {c |}{res}        813        4.95      100.00
{txt}{hline 30}{c +}{hline 35}
                        Total {c |}{res}     16,412      100.00
{txt}
{com}. drop if _merge == 1
{txt}(15,599 observations deleted)

{com}. drop _merge 
{txt}
{com}. egen n_bookrunner_linked = nvals(BankID), by(sdc_id)
{txt}(184 missing values generated)

{com}. bys sdc_id: gen first = _n == 1
{txt}
{com}. tab n_b* if first == 1

{txt}n_bookrunn {c |}                             n_bookrunner_linked
   ers_sdc {c |}         1          2          3          4          5          6          7 {c |}     Total
{hline 11}{c +}{hline 77}{c +}{hline 10}
         1 {c |}{res}       161          0          0          0          0          0          0 {txt}{c |}{res}       161 
{txt}         2 {c |}{res}         9         60          0          0          0          0          0 {txt}{c |}{res}        69 
{txt}         3 {c |}{res}         1         10          9          0          0          0          0 {txt}{c |}{res}        20 
{txt}         4 {c |}{res}         3          1         11          2          0          0          0 {txt}{c |}{res}        17 
{txt}         5 {c |}{res}         0          0          3          0          1          0          0 {txt}{c |}{res}         4 
{txt}         6 {c |}{res}         0          0          0          2          1          0          0 {txt}{c |}{res}         3 
{txt}         7 {c |}{res}         0          0          0          0          0          1          0 {txt}{c |}{res}         1 
{txt}         8 {c |}{res}         0          0          0          0          0          1          1 {txt}{c |}{res}         2 
{txt}        10 {c |}{res}         0          0          0          0          0          0          0 {txt}{c |}{res}         1 
{txt}        12 {c |}{res}         0          0          0          0          0          1          0 {txt}{c |}{res}         1 
{txt}        14 {c |}{res}         0          0          0          0          0          0          0 {txt}{c |}{res}         1 
{txt}        15 {c |}{res}         0          0          0          0          0          0          0 {txt}{c |}{res}         1 
{txt}        16 {c |}{res}         0          0          0          0          0          0          0 {txt}{c |}{res}         1 
{txt}        19 {c |}{res}         0          0          0          0          0          0          0 {txt}{c |}{res}         2 
{txt}        21 {c |}{res}         0          0          0          0          0          0          0 {txt}{c |}{res}         1 
{txt}        23 {c |}{res}         0          0          0          0          0          0          0 {txt}{c |}{res}         1 
{txt}{hline 11}{c +}{hline 77}{c +}{hline 10}
     Total {c |}{res}       174         71         23          4          2          3          1 {txt}{c |}{res}       286 


{txt}n_bookrunn {c |}                  n_bookrunner_linked
   ers_sdc {c |}         8          9         10         11         13 {c |}     Total
{hline 11}{c +}{hline 55}{c +}{hline 10}
         1 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}       161 
{txt}         2 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}        69 
{txt}         3 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}        20 
{txt}         4 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}        17 
{txt}         5 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}         4 
{txt}         6 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}         3 
{txt}         7 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}         1 
{txt}         8 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}         2 
{txt}        10 {c |}{res}         1          0          0          0          0 {txt}{c |}{res}         1 
{txt}        12 {c |}{res}         0          0          0          0          0 {txt}{c |}{res}         1 
{txt}        14 {c |}{res}         0          0          1          0          0 {txt}{c |}{res}         1 
{txt}        15 {c |}{res}         0          0          1          0          0 {txt}{c |}{res}         1 
{txt}        16 {c |}{res}         0          0          0          1          0 {txt}{c |}{res}         1 
{txt}        19 {c |}{res}         0          1          0          0          1 {txt}{c |}{res}         2 
{txt}        21 {c |}{res}         0          0          1          0          0 {txt}{c |}{res}         1 
{txt}        23 {c |}{res}         0          0          1          0          0 {txt}{c |}{res}         1 
{txt}{hline 11}{c +}{hline 55}{c +}{hline 10}
     Total {c |}{res}         1          1          4          1          1 {txt}{c |}{res}       286 
{txt}
{com}. sum n_boo* if first == 1, de 

                      {txt}n_bookrunners_sdc
{hline 61}
      Percentiles      Smallest
 1%    {res}        1              1
{txt} 5%    {res}        1              1
{txt}10%    {res}        1              1       {txt}Obs         {res}        418
{txt}25%    {res}        1              1       {txt}Sum of wgt. {res}        418

{txt}50%    {res}        1                      {txt}Mean          {res} 2.296651
                        {txt}Largest       Std. dev.     {res} 2.845003
{txt}75%    {res}        2             19
{txt}90%    {res}        4             19       {txt}Variance      {res} 8.094042
{txt}95%    {res}        7             21       {txt}Skewness      {res} 4.137764
{txt}99%    {res}       16             23       {txt}Kurtosis      {res} 23.23289

                     {txt}n_bookrunner_linked
{hline 61}
      Percentiles      Smallest
 1%    {res}        1              1
{txt} 5%    {res}        1              1
{txt}10%    {res}        1              1       {txt}Obs         {res}        286
{txt}25%    {res}        1              1       {txt}Sum of wgt. {res}        286

{txt}50%    {res}        1                      {txt}Mean          {res} 1.807692
                        {txt}Largest       Std. dev.     {res} 1.713131
{txt}75%    {res}        2             10
{txt}90%    {res}        3             10       {txt}Variance      {res} 2.934818
{txt}95%    {res}        4             11       {txt}Skewness      {res} 3.777688
{txt}99%    {res}       10             13       {txt}Kurtosis      {res}  19.2422
{txt}
{com}. drop first
{txt}
{com}. gen float BankAllocation_pct = 100/n_bookrunner_linked
{txt}(184 missing values generated)

{com}. gen amount_trans_lender_usdm = amount_trans_usdm/n_bookrunner_linked
{txt}(184 missing values generated)

{com}. 
. keep transaction_bond_id BankID BankAllocation_pct amount_trans_lender_usdm
{txt}
{com}. 
. compress
{txt}  (0 bytes saved)

{com}. save ../Intermediate/transaction_lender_clean_bonds, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/transaction_lender_clean_bonds.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/transaction_lender_clean_bonds.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. 
. {txt}
{com}. 
. //combine these into an overall transaction files set
. include "../Data_Cleaning/Build_Transaction_Files.do" 
{txt}
{com}. 
. //start with transaction level files 
. use ../Intermediate/transaction_clean_loans, clear
{txt}
{com}. append using ../Intermediate/transaction_clean_bonds, gen(src)
{res}{txt}
{com}. gen source = "Dealscan" if source_ds == 1
{txt}(19,544 missing values generated)

{com}. replace source = "IJ Global" if source_ds == 0
{txt}variable {bf}{res}source{sf}{txt} was {bf}{res}str8{sf}{txt} now {bf}{res}str9{sf}
{txt}(2,977 real changes made)

{com}. replace source = "SDC" if src == 1
{txt}(16,450 real changes made)

{com}. drop source_ds src
{txt}
{com}. replace bond_ind = 1 if source == "SDC"
{txt}(16,450 real changes made)

{com}. 
. //make a new transaction id 
. egen transaction_id = group(transaction_loan_id transaction_bond_id), missing
{txt}
{com}. 
. //save transaciton id link
. preserve
{txt}
{com}. keep transaction_id transaction_loan_id transaction_bond_id
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(433 observations deleted)

{com}. tempfile translink 
{txt}
{com}. save `translink'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000014{rm}
saved
as .dta format
{p_end}

{com}. restore 
{txt}
{com}. 
. //keep cleaning up 
. drop transaction_bond_id transaction_loan_id
{txt}
{com}. order transaction_id
{txt}
{com}. order sdc_id, after(TrancheId)
{txt}
{com}. gen coupon_bps = 100*coupon
{txt}(16,385 missing values generated)

{com}. order coupon_bps, after(spread_bps)
{txt}
{com}. drop coupon 
{txt}
{com}. replace obs_ammendment = 0 if source == "SDC"
{txt}(16,450 real changes made)

{com}. 
. compress 
  {txt}variable {bf}{res}transaction_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}bond_ind{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}obs_ammendment{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
{txt}  (214,400 bytes saved)

{com}. save ../Intermediate/transaction_clean, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/transaction_clean.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/transaction_clean.dta{rm}
saved
{p_end}

{com}. 
. 
. //now build transaction by lender files
. use ../Intermediate/transaction_lender_clean_bonds, clear
{txt}
{com}. joinby transaction_bond_id using `translink'
{txt}
{com}. unique transaction_id BankID
{txt}Number of unique values of transaction_id BankID is  {res}813
{txt}Number of records is  {res}813
{txt}
{com}. tempfile tb
{txt}
{com}. save `tb'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000015{rm}
saved
as .dta format
{p_end}

{com}. 
. use ../Intermediate/transaction_lender_clean_loans, clear
{txt}
{com}. joinby transaction_loan_id using `translink'
{txt}
{com}. unique transaction_id BankID
{txt}Number of unique values of transaction_id BankID is  {res}67342
{txt}Number of records is  {res}67422
{txt}
{com}. append using `tb', gen(src_sdc)
{res}{txt}
{com}. 
. duplicates report transaction_id BankID 

{p 0 4}{txt}Duplicates in terms of {res} transaction_id BankID{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}        {res}68100             0
        {txt}2 {c |}           {res}74            37
        {txt}3 {c |}           {res}36            24
        {txt}4 {c |}           {res}20            15
        {txt}5 {c |}            {res}5             4
{txt}{hline 10}{c BT}{hline 27}

{com}. 
. drop transaction_loan_id transaction_bond_id
{txt}
{com}. order transaction_id 
{txt}
{com}. replace lead_bank = 1 if src_sdc == 1
{txt}(813 real changes made)

{com}. drop src_sdc
{txt}
{com}. compress
  {txt}variable {bf}{res}transaction_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}BankID{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}lead_bank{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}n_ijg_trans{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}n_ds_trans{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}long{sf}
  {txt}variable {bf}{res}BankName{sf}{txt} was {bf}{res}str90{sf}{txt} now {bf}{res}str75{sf}
{txt}  (1,910,580 bytes saved)

{com}. 
. merge m:1 BankID using ../Raw/Bank_Sample/BankSample_List, nogen keep(1 3) 
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:BankName} was {bf:str75}, now {bf:str90} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:n_ds_trans} was {bf:long}, now {bf:double} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:n_ijg_trans} was {bf:int}, now {bf:long} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           1,021
{txt}{col 9}from master{col 30}{res}           1,021{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          67,214{txt}  
{col 5}{hline 41}

{com}. 
. 
. save ../Intermediate/transaction_lender_clean, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/transaction_lender_clean.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/transaction_lender_clean.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. 
. 
. **************************************************************************
. ******* BUILD DERIVATIVE DATA POTENTIALLY BASED ON SAMPLE ITSELF
. **************************************************************************
. include "../Data_Cleaning/Build_Borrower_Characterstics.do"
{txt}
{com}. 
. //build dataset of borrower characteristics
. 
. use ../Intermediate/borrower_file, clear
{txt}
{com}. merge 1:1 borrower_id using ../Raw/Orbis/orbis_borrower_link, keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             449
{txt}{col 9}from master{col 30}{res}             449{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             486{txt}  
{col 5}{hline 41}

{com}. merge m:1 BvDIDnumber using ../Raw/Orbis/orbis_public_flag, keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             457
{txt}{col 9}from master{col 30}{res}             457{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             478{txt}  
{col 5}{hline 41}

{com}. save ../Intermediate/borrower_chars, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/borrower_chars.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/borrower_chars.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. 
. *************************************************************
. ************ PRE-ANALYSIS DATA PROCESSING
. *************************************************************
. * Generate Exposure Shares 
. include "../Data_Cleaning/Build_Borrow_Exposure.do" 
{txt}
{com}. 
. //COMPUTE MEASURES OF BORROWER EXPOSURES TO EACH BANK IN THE SAMPLE
. 
. * Get underlying loan data 
. use ../Intermediate/transaction_clean, clear
{txt}
{com}. joinby transaction_id using ../Intermediate/transaction_lender_clean
{txt}
{com}. drop if missing(BankID) | missing(date_trans) | obs_ammendment == 1 | ///
>                                 amount_trans_usdm <= 0 | missing(amount_trans_usdm) | ///
>                                 amount_trans_lender_usdm < 0
{txt}(15,355 observations deleted)

{com}. replace lead_bank = 1 if bond_ind == 1 
{txt}(97 real changes made)

{com}. egen num_lead = sum(lead_bank), by(borrower_id transaction_id)
{txt}
{com}. gen amount_lead_usdm = amount_trans_usdm/num_lead if bond_ind == 0  
{txt}(3,325 missing values generated)

{com}. replace amount_lead_usdm = amount_trans_lender_usdm if bond_ind == 1
{txt}(2,047 real changes made)

{com}. drop num_lead
{txt}
{com}. 
. //scopes of interest:
. gen dtype_debt = 1 
{txt}
{com}. gen period_pre  = inrange(date_trans,d(01jan2009),d(01jan2014)) 
{txt}
{com}. gen rtype_all = amount_trans_lender_usdm 
{txt}
{com}. 
. //Create exposure share variables
. egen sum_period_all_debt  = sum(period_pre * rtype_all * dtype_debt), by(borrower_id)
{txt}
{com}. egen bank_period_all_debt = sum(period_pre * rtype_all * dtype_debt), by(borrower_id BankID)
{txt}
{com}. gen  exp_share_pre_all_debt = bank_period_all_debt / sum_period_all_debt
{txt}(1,656 missing values generated)

{com}. drop sum_period_all_debt bank_period_all_debt
{txt}
{com}. 
. 
. sort borrower_id BankID date_trans transaction_id 
{txt}
{com}. keep borrower_id BankID exp_share_*
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(39,686 observations deleted)

{com}. 
. foreach exp of var exp_share_* {c -(}
{txt}  2{com}.         replace `exp' = 0 if missing(`exp')
{txt}  3{com}. {c )-}
{txt}(973 real changes made)

{com}. 
. 
. compress
  {txt}variable {bf}{res}BankID{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
{txt}  (26,398 bytes saved)

{com}. 
. save ../Intermediate/exposure_shares, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/exposure_shares.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/exposure_shares.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. * Combine Into Shift Shares
. include "../Data_Cleaning/Build_Shift_Share.do" 
{txt}
{com}. clear all
{res}{txt}
{com}. set maxvar 50000

{txt}
{com}. 
. //load up the bank strength measures 
. use ../Intermediate/bank_ban_strength_yearly, clear
{txt}
{com}. rename ban_intensity_new1 banintsty_n1
{res}{txt}
{com}. 
. //list of ban strength variables
. local ban_strength_list banintsty_n1 
{txt}
{com}. 
. keep BankName BankID year `ban_strength_list' 
{txt}
{com}. compress
{txt}  (0 bytes saved)

{com}. tempfile bans 
{txt}
{com}. save `bans'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000016{rm}
saved
as .dta format
{p_end}

{com}. 
. //load up the borrower bank exposures 
. use ../Intermediate/exposure_shares, clear  
{txt}
{com}. keep borrower_id BankID exp_share_*
{txt}
{com}. rename exp_share_* *
{res}{txt}
{com}. //list of exposure variables 
. ds borrower_id BankID, not
{txt}{col 1}pre_all_debt

{com}. local exposure_list `r(varlist)'
{txt}
{com}. 
. joinby BankID using `bans', unmatched(both) 
{txt}
{com}. keep if _merge == 3 
{txt}(268,586 observations deleted)

{com}. drop _merge 
{txt}
{com}. 
. order borrower_id BankID year 
{txt}
{com}. sort borrower_id BankID year 
{txt}
{com}. 
. //generate bartick instruments 
. qui foreach es in `exposure_list' {c -(}
{txt}
{com}. 
. keep borrower_id year ss_*
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(279,862 observations deleted)

{com}. compress
{txt}  (0 bytes saved)

{com}. save ../Intermediate/shift_shares, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/shift_shares.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/shift_shares.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. * Build Non-Bank List
. include "../Data_Cleaning/Build_Non_Bank_List.do" 
{txt}
{com}. 
. 
. ********************************************************************************
. * THE GOAL OF THIS DO FILE IS TO ID ALL NON-BANKS IN OUR MAIN SAMPLE
. ********************************************************************************
. use ../Raw/Bank_Sample/BankSample_List, clear
{txt}
{com}. 
. keep BankID BankName
{txt}
{com}. replace BankName = trim(BankName)
{txt}(0 real changes made)

{com}. replace BankName = strlower(BankName)
{txt}(13,641 real changes made)

{com}. gen is_bank = strpos(BankName, "bank") > 0
{txt}
{com}. replace is_bank = strpos(BankName, "banco") > 0 if is_bank == 0
{txt}(325 real changes made)

{com}. replace is_bank = strpos(BankName, "banque") > 0 if is_bank == 0
{txt}(143 real changes made)

{com}. replace is_bank = strpos(BankName, "banca") > 0 if is_bank == 0
{txt}(161 real changes made)

{com}. replace is_bank = strpos(BankName, "depot") > 0 if is_bank == 0
{txt}(2 real changes made)

{com}. replace is_bank = strpos(BankName, "caja") > 0 if is_bank == 0
{txt}(103 real changes made)

{com}. replace is_bank = strpos(BankName, "caixa") > 0 if is_bank == 0
{txt}(28 real changes made)

{com}. replace is_bank = strpos(BankName, "credit") > 0 if is_bank == 0
{txt}(428 real changes made)

{com}. replace is_bank = strpos(BankName, "bancshares") > 0 if is_bank == 0
{txt}(12 real changes made)

{com}. 
. //Dev Bank
. replace is_bank = 0 if inlist(BankName, "african development bank", "agricultural development bank of china", "asian development bank", "banque de developpement des etats de l'afrique centrale [bdeac]", "west african development bank", "black sea trade & development bank [bstdb]")
{txt}(6 real changes made)

{com}. replace is_bank = 0 if inlist(BankName, "central african state development bank", "china development bank [cdb]", "development bank of japan inc", "development bank of southern africa", "development bank of the philippines")
{txt}(5 real changes made)

{com}. replace is_bank = 0 if inlist(BankName, "eastern & southern african trade & development bank [pta bank]", "european bank for reconstruction & development (ebrd)", "industrial development bank of india", "islamic development bank")
{txt}(4 real changes made)

{com}. replace is_bank = 0 if inlist(BankName, "korea development bank", "north american development bank", "eco trade and development bank")
{txt}(3 real changes made)

{com}. 
. //Export 
. replace is_bank = 0 if inlist(BankName, "african export-import bank [afreximbank]", "danish export credit fund (eksport kredit fonden (ekf))", "eksportkreditt norge as [export credit norway]", "export import bank of the united states", "export-import bank of china [china eximbank]", "export-import bank of india (eximbank india)")
{txt}(6 real changes made)

{com}. replace is_bank = 0 if inlist(BankName, "export-import bank of korea (kexim)", "export-import bank of thailand", "export-import bank of the republic of china", "svensk exportkredit ab (publ) [sek] [swedish export credit corp]", "japan bank for international cooperation")
{txt}(5 real changes made)

{com}. replace is_bank = 0 if inlist(BankName, "china exim bank", "indonesia eximbank", "romanian eximbank")
{txt}(3 real changes made)

{com}. 
. //Indian Banks
. replace is_bank = 0 if inlist(BankName, "reserve bank of india") //Indian Central Bank
{txt}(1 real change made)

{com}. replace is_bank = 0 if inlist(BankName, "inpex", "bank of canada")
{txt}(1 real change made)

{com}. 
. 
. 
. * Replace commands with only confirmed banks
. replace is_bank = 1 if inlist(BankName, "atb financial", "ally financial inc", "bok financial corp", "bok financial corporation", "beal financial corp")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "bryn mawr trust", "ctbc financial holding co ltd", "capital one financial corp", "cathay financial holdings co ltd", "china development financial holding corp")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "citizens financial group", "daishi hokuetsu financial group inc", "first commonwealth financial corp", "first financial holding co ltd", "fubon financial holding co ltd")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "fuhwa financial holding co ltd", "hana financial group inc", "hua nan financial holdings co ltd", "kb financial group inc", "lh financial group")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "lakeland financial corp", "mebuki financial group inc", "mega financial holding co ltd", "midland financial co", "mitsubishi ufj financial group inc")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "mizuho financial group inc", "nonghyup financial group inc", "northern trust corp", "op financial group", "svb financial group")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "samba financial group", "shin kong financial holdings co ltd", "shinhan financial group", "stifel financial corp", "sumitomo mitsui financial group inc")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "sumitomo mitsui trust holdings inc", "synovus financial corp", "tisco financial group pcl", "taishin financial holding co ltd", "truist financial")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "woori financial holdings co ltd", "morgan stanley", "ubs ag", "wells fargo & co", "westlb", "yokohama shinkin", "abn amro")
{txt}(6 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "banif", "barclays", "cit group inc", "crediop spa", "citi", "goldman sachs & co", "jp morgan")
{txt}(7 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "ing group", "bnp paribas sa" )
{txt}(2 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "banorte", "banreservas", "bawag", "bayernLB")
{txt}(3 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "cibc", "cm-cic", "cimb group", "cimb group holdings bhd")
{txt}(4 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "csob", "comerica inc", "credicorp", "dnb")
{txt}(4 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "emirates nbd pjsc", "helaba", "hibernia Corp")
{txt}(2 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "icbc", "icici ltd", "investec group ltd")
{txt}(3 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "kbc group", "kommunalkredit austria ag", "kotak mahindra group", "kuwait finance house ksc [kfh]")
{txt}(4 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "macquarie group ltd", "marshall & ilsley corp", "nibc")
{txt}(3 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "nordlb group")
{txt}(1 real change made)

{com}. replace is_bank = 1 if inlist(BankName, "rhb capital bhd", "resona holdings inc", "sal oppenheim jr & cie kgaa", "shinginko tokyo", "societe generale sa", "stadtsparkasse düsseldorf")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "suncorp-metway ltd", "tskb", "millennium bcp")
{txt}(3 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "vtb group", "valley national corp", "washington mutual inc", "yapi kredi", "hdfc ltd")
{txt}(5 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "al khaliji", "intesa sanpaolo spa [isp]", "btg pactual")
{txt}(3 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "bancfirst corp", "bayernlb", "dresdner kleinwort", "stadtsparkasse dusseldorf")
{txt}(4 real changes made)

{com}. replace is_bank = 1 if inlist(BankName, "rbc capital markets", "nomura holdings inc", "bmo capital markets financing inc", "portigon ag", "daewoo securities co", "jefferies", "sinopac financial holdings co ltd")
{txt}(7 real changes made)

{com}. 
. replace is_bank = 1 if inlist(BankName, "asbanda", "invesco ltd", "kakawa discount house", "marubeni corp", "merrill lynch international & co", "mitsubishi corp", "XXX", "pts financial services")
{txt}(7 real changes made)

{com}. 
. 
. //Label Government Actors
. gen gov_actor = 0
{txt}
{com}. replace gov_actor = 1 if inlist(BankName, "africa finance corporation", "agence francaise de development [afd]", "arab petroleum investments corp [apicorp]", "belgian investment company for developing countries", "clean energy finance corp", "clean energy finance corporation")
{txt}(6 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "clean technology fund", "climate investment funds", "corporacion interamericana para el financiamiento de infraestructura", "credendo group", "eksport kredit fonden", "eksportfinans asa") 
{txt}(6 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "emerging africa infrastructure fund", "uk export finance [ukef]", "export development canada [edc]", "export finance & insurance corp", "giek", "government of australia")
{txt}(6 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "government of canada", "government of france", "government of india", "government of malaysia", "government of singapore", "government of the united states of america") 
{txt}(6 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "india infrastructure finance co ltd", "indian renewable energy development agency ltd", "industrial development corporation of south africa", "infrastructure development company limited [idcol]", "infrastructure development finance co ltd", "inter american investment") 
{txt}(5 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "international finance co ksc [ifc]", "japan international cooperation agency", "korea trade insurance corp (k-sure)", "multilateral investment guarantee agency [miga]", "national pension service of korea", "nippon export & investment insurance [nexi]")
{txt}(4 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "opec fund for international development [ofid]", "overseas private investment corporation", "public investment fund", "republic of indonesia", "sarana multi infrastruktur", "saudi industrial development fund") 
{txt}(6 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "sinosure", "state grid corp of china", "swedfund international", "united states department of energy", "united states department of transportation", "kingdom of thailand", "cofide", "world bank")
{txt}(8 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "power finance corp ltd", "rural electrification corp", "industrial finance corporation of india", "institut catala de finances", "korea finance corporation", "korea finance corp", "pt indonesia infrastructure finance", "pak brunei investment co ltd")
{txt}(8 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "bndes", "banobras", "kfw", "nacional financiera snc", "nederlandse financierings-maatschappij voor ontwikkelingslanden nv [fmo]")
{txt}(5 real changes made)

{com}. 
. replace gov_actor = strpos(BankName, "depositi") > 0 if gov_actor == 0
{txt}(1 real change made)

{com}. replace gov_actor = strpos(BankName, "bpd") > 0 if gov_actor == 0
{txt}(21 real changes made)

{com}. 
. replace gov_actor = 1 if inlist(BankName, "african development bank", "agricultural development bank of china", "asian development bank", "banque de developpement des etats de l'afrique centrale [bdeac]", "west african development bank", "black sea trade & development bank [bstdb]")
{txt}(6 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "central african state development bank", "china development bank [cdb]", "development bank of japan inc", "development bank of southern africa", "development bank of the philippines")
{txt}(5 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "eastern & southern african trade & development bank [pta bank]", "european bank for reconstruction & development (ebrd)", "industrial development bank of india", "islamic development bank")
{txt}(4 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "korea development bank", "north american development bank", "eco trade and development bank", "bpd south sulawesi")
{txt}(3 real changes made)

{com}. 
. replace gov_actor = 1 if inlist(BankName, "aga khan development network", "australian renewable energy agency", "government of new south wales", "national federation of fisheries cooperatives", "nigeria sovereign investment authority", "perusahaan listrik negara (pln)", "state development & investment corp (sdic)", "temasek")
{txt}(8 real changes made)

{com}. 
. 
. replace gov_actor = 1 if inlist(BankName, "african development bank", "agricultural development bank of china", "asian development bank", "banque de developpement des etats de l'afrique centrale [bdeac]", "west african development bank", "black sea trade & development bank [bstdb]")
{txt}(0 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "central african state development bank", "china development bank [cdb]", "development bank of japan inc", "development bank of southern africa", "development bank of the philippines")
{txt}(0 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "eastern & southern african trade & development bank [pta bank]", "european bank for reconstruction & development (ebrd)", "industrial development bank of india", "islamic development bank")
{txt}(0 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "korea development bank", "north american development bank", "eco trade and development bank")
{txt}(0 real changes made)

{com}. 
. //Export 
. replace gov_actor = 1 if inlist(BankName, "african export-import bank [afreximbank]", "danish export credit fund (eksport kredit fonden (ekf))", "eksportkreditt norge as [export credit norway]", "export import bank of the united states", "export-import bank of china [china eximbank]", "export-import bank of india (eximbank india)")
{txt}(6 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "export-import bank of korea (kexim)", "export-import bank of thailand", "export-import bank of the republic of china", "svensk exportkredit ab (publ) [sek] [swedish export credit corp]", "japan bank for international cooperation")
{txt}(5 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "china exim bank", "indonesia eximbank", "romanian eximbank")
{txt}(3 real changes made)

{com}. replace gov_actor = 1 if inlist(BankName, "reserve bank of india") //Indian Central Bank
{txt}(1 real change made)

{com}. replace gov_actor = 1 if inlist(BankName, "inpex", "bank of canada")
{txt}(2 real changes made)

{com}. 
. 
. 
. 
. 
. // Non-financial Corporations
. gen non_financial = 0
{txt}
{com}. replace non_financial = 1 if inlist(BankName, "caterpillar inc", "china huaneng group", "china petrochemical corp [sinopec group]", "enel", "energy development corporation", "general electric capital corp")
{txt}(6 real changes made)

{com}. replace non_financial = 1 if inlist(BankName, "hanwha corp", "henan energy and chemical industry group co ltd", "hong leong group (malaysia)", "larsen & toubro", "siemens ag", "tata sons ltd") 
{txt}(6 real changes made)

{com}. 
. replace non_financial = 1 if inlist(BankName, "tatneft oao", "total", "bhp billiton finance ltd", "bhp billiton", "bulgaria solarfarm", "chubu electric power co inc") 
{txt}(6 real changes made)

{com}. 
. replace non_financial = 1 if inlist(BankName, "eig global energy partners", "inpex", "nrg energy", "osaka gas co ltd", "phoenix american", "tokyo gas co ltd", "eurus energy")
{txt}(7 real changes made)

{com}. 
. 
. 
. //Private Lenders
. gen asset_manager_or_pe = 0
{txt}
{com}. replace asset_manager_or_pe = 1 if inlist(BankName, "aegon usa investment management", "amp ltd", "bain capital", "blackrock inc", "blackstone group lp")
{txt}(5 real changes made)

{com}. replace asset_manager_or_pe = 1 if inlist(BankName, "cordiant capital", "farallon capital management llc", "federated investors", "goldentree asset management lp", "highland capital corp") 
{txt}(5 real changes made)

{com}. replace asset_manager_or_pe = 1 if inlist(BankName, "kkr & co inc", "lyon capital management llc", "metrics capital partners", "nm rothschild & sons ltd", "oak hill capital partners", "silverpoint capital",  "trimaran capital partners")
{txt}(7 real changes made)

{com}. 
. replace asset_manager_or_pe = 1 if inlist(BankName, "al enma", "american capital ltd", "clifford capital", "cordiant plc", "kohlberg & co", "partners group ag", "ripplewood holdings llc", "sdic finance co ltd", "saratoga investment corp")
{txt}(9 real changes made)

{com}. replace asset_manager_or_pe = 1 if inlist(BankName, "sierra clo-i", "stellus capital management", "white oak global advisors llc", "harbert management", "alvarez & marsal", "fidus investment corporation")
{txt}(6 real changes made)

{com}. 
. 
. //Others
. gen non_bank_other = gov_actor == 0 & is_bank == 0 & non_financial == 0 & asset_manager_or_pe == 0
{txt}
{com}. 
. save "../Intermediate/non_bank_list", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/non_bank_list.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/non_bank_list.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. 
. 
. 
. {txt}
{com}. 
. ** GENERATE BORROWING PANEL AT BORROWER YEAR LEVEL 
. include "../Data_Cleaning/Build_Borrowing_Panel.do"
{txt}
{com}. 
. * Get underlying loan data 
. use ../Intermediate/transaction_clean, clear
{txt}
{com}. joinby transaction_id using ../Intermediate/transaction_lender_clean //merge in the lenders for each instrument
{txt}
{com}. 
. drop if missing(BankID)
{txt}(875 observations deleted)

{com}. drop if amount_trans_usdm <= 0 | missing(amount_trans_usdm) | amount_trans_lender_usdm < 0
{txt}(1,507 observations deleted)

{com}. drop if missing(date_trans)
{txt}(0 observations deleted)

{com}. drop if obs_ammendment == 1
{txt}(12,973 observations deleted)

{com}. gen year = yofd(date_trans)
{txt}
{com}. 
. //Adding non-bank transactions Data 
. append using "../Raw/psedo/aggregate_non_bank_trans"
{txt}
{com}. 
. //Merging in id for non-bank
. merge m:1 BankID using "../Intermediate/non_bank_list", keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             511
{txt}{col 9}from master{col 30}{res}             511{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          52,763{txt}  
{col 5}{hline 41}

{com}. gen non_bank = is_bank == 0 
{txt}
{com}. 
. 
. joinby BankID year using ../Intermediate/bank_ban_strength_yearly, unmatched(master) 
{txt}
{com}. gen no_ban_data = _merge == 1
{txt}
{com}. drop _merge
{txt}
{com}. replace active_policy = 0 if no_ban_data == 1
{txt}(23,130 real changes made)

{com}. merge m:1 borrower_id BankID using ../Intermediate/exposure_shares, nogen 
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             389
{txt}{col 9}from master{col 30}{res}             389{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          52,885{txt}  
{col 5}{hline 41}

{com}. 
. //period of interest
. gen period_pre  = inrange(date_trans,d(01jan2009),d(01jan2014)) 
{txt}
{com}. 
. //debt type: loan, bond all
. gen dtype_bond = bond_ind == 1
{txt}
{com}. gen dtype_loan = bond_ind == 0
{txt}
{com}. gen dtype_debt = 1
{txt}
{com}. 
. //policy type
. gen borr_debt                    = amount_trans_lender_usdm * dtype_debt
{txt}
{com}. gen borr_debt_actvpol            = amount_trans_lender_usdm * dtype_debt * active_policy
{txt}
{com}. gen borr_debt_has_coded_policy   = amount_trans_lender_usdm * dtype_debt * has_coded_policy
{txt}(23,130 missing values generated)

{com}. 
. // relationship‐ & period‐specific borrowing
. gen borr_debt_rel_all_pre               = borr_debt * (exp_share_pre_all_debt > 0)
{txt}
{com}. gen borr_debt_rel_all_pre_actvpol       = borr_debt * (exp_share_pre_all_debt > 0) * active_policy
{txt}
{com}. gen borr_debt_rel_all_pre_haspol        = borr_debt * (exp_share_pre_all_debt > 0) * has_coded_policy
{txt}(23,130 missing values generated)

{com}. 
. 
. //Any lender is a non-bank
. gen borr_loan = amount_trans_lender_usdm*dtype_loan
{txt}
{com}. gen borr_debt_non_bank = amount_trans_lender_usdm*non_bank
{txt}
{com}. gen borr_debt_non_bank_og_sample = borr_debt_non_bank
{txt}
{com}. replace borr_debt_non_bank = borr_debt_non_bank + borr_debt if non_bank_deals == 1 //Adding non-bank deals
{txt}(389 real changes made)

{com}. gen borr_debt_gov = amount_trans_lender_usdm*gov_actor
{txt}(511 missing values generated)

{com}. gen borr_debt_corp = amount_trans_lender_usdm*non_financial
{txt}(511 missing values generated)

{com}. gen borr_debt_private_non_bank = amount_trans_lender_usdm*asset_manager_or_pe
{txt}(511 missing values generated)

{com}. gen borr_debt_non_bank_other = amount_trans_lender_usdm*non_bank_other
{txt}(511 missing values generated)

{com}. 
. 
. //collapse lending to borrower year level 
. preserve
{txt}
{com}. collapse (sum) borr_* , by(borrower_id year)
{res}{txt}
{com}. 
. //get shares
. foreach dtype in debt  {c -(}
{txt}  2{com}.         gen shr_`dtype'_actvpol = borr_`dtype'_actvpol/borr_`dtype'
{txt}  3{com}. foreach reltype in all {c -(}
{txt}  4{com}. foreach period in pre {c -(}
{txt}  5{com}.         gen shr_`dtype'_rel_`reltype'_`period'_actvpol = borr_`dtype'_rel_`reltype'_`period'_actvpol/borr_`dtype'
{txt}  6{com}.         gen shr_`dtype'_rel_`reltype'_`period'_haspol = borr_`dtype'_rel_`reltype'_`period'_haspol/borr_`dtype'
{txt}  7{com}.         gen shr_`dtype'_rel_`reltype'_`period' = borr_`dtype'_rel_`reltype'_`period'/borr_`dtype'
{txt}  8{com}. {c )-}
{txt}  9{com}. {c )-}
{txt} 10{com}.         gen shr_`dtype' = borr_`dtype'/borr_debt
{txt} 11{com}. {c )-}
{txt}
{com}. drop shr_debt
{txt}
{com}. 
. tempfile borr 
{txt}
{com}. save `borr'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000018{rm}
saved
as .dta format
{p_end}

{com}. restore
{txt}
{com}. 
. 
. tabulate debt_type, gen(dt)

       {txt}debt_type {c |}      Freq.     Percent        Cum.
{hline 17}{c +}{hline 35}
            Bond {c |}{res}      1,662        3.14        3.14
{txt}     Bridge Loan {c |}{res}        811        1.53        4.68
{txt}              CP {c |}{res}        124        0.23        4.91
{txt}Letter of Credit {c |}{res}      1,197        2.26        7.17
{txt}             MTN {c |}{res}        108        0.20        7.38
{txt}         Med-Trm {c |}{res}          5        0.01        7.39
{txt}   Non-Bank Deal {c |}{res}        197        0.37        7.76
{txt}            Note {c |}{res}        103        0.19        7.95
{txt}           Other {c |}{res}      2,910        5.50       13.46
{txt}        Revolver {c |}{res}     19,374       36.63       50.09
{txt}    Secured Bond {c |}{res}         20        0.04       50.13
{txt}       Term Loan {c |}{res}     26,374       49.87      100.00
{txt}{hline 17}{c +}{hline 35}
           Total {c |}{res}     52,885      100.00
{txt}
{com}. gen dt_allbonds = bond_ind == 1
{txt}
{com}. rename dt2 dt_bridge
{res}{txt}
{com}. rename dt3 dt_cp 
{res}{txt}
{com}. rename dt4 dt_loc
{res}{txt}
{com}. rename dt5 dt_mtn
{res}{txt}
{com}. rename dt9 dt_revolver
{res}{txt}
{com}. rename dt11 dt_term
{res}{txt}
{com}. 
. 
. gcollapse (mean) project_finance refinance_ind dt_* spread_bps coupon_bps [aweight=amount_trans_lender_usdm], by(borrower_id year) missing
Option -missing- is deprecated. Use (nansum) or (rawnansum) instead.
{res}{txt}{res}{txt}{res}{txt}
{com}. 
. merge 1:1 borrower_id year using `borr', keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           4,305{txt}  
{col 5}{hline 41}

{com}. 
. 
. ds borrower_id year, not
{txt}{col 1}project_fi~e{col 15}dt_loc{col 29}dt_allbonds{col 43}bo~t_actvpol{col 57}borr_de~spol{col 71}borr_debt_~v{col 85}shr_debt_a~l
{col 1}refinance_~d{col 15}dt_mtn{col 29}spread_bps{col 43}borr_debt_~y{col 57}borr_loan{col 71}borr_debt_~p{col 85}sh~e_actvpol
{col 1}dt_bridge{col 15}dt_revolver{col 29}coupon_bps{col 43}borr_debt~re{col 57}b~t_non_bank{col 71}b~e_non_bank{col 85}shr_deb~spol
{col 1}dt_cp{col 15}dt_term{col 29}borr_debt{col 43}bo~e_actvpol{col 57}borr_debt~le{col 71}borr_debt_~r{col 85}shr_debt_r~e

{com}. local fillvars `r(varlist)'
{txt}
{com}. 
. tsset borrower_id year
{res}
{col 1}{txt:Panel variable: }{res:borrower_id}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:1983}}{txt: to }{res:{bind:2035}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. gen orig = 1
{txt}
{com}. tsfill, full 
{txt}
{com}. foreach var of var `fillvars' {c -(}
{txt}  2{com}.         replace `var' = 0 if orig == .
{txt}  3{com}. {c )-}
{txt}(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)
(18,432 real changes made)

{com}. replace spread_bps = . if orig == .
{txt}(18,432 real changes made, 18,432 to missing)

{com}. replace coupon_bps = . if orig == .
{txt}(18,432 real changes made, 18,432 to missing)

{com}. replace orig = 0 if missing(orig)
{txt}(18,432 real changes made)

{com}. label var orig "has loan or bond in this year"
{txt}
{com}. compress
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}orig{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
{txt}  (113,685 bytes saved)

{com}. save ../Intermediate/borrowing_panel, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/borrowing_panel.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/borrowing_panel.dta{rm}
saved
{p_end}

{com}. 
. 
. {txt}
{com}. 
. ** GENERATE EQUITY ISSUANCE PANEL AT BORROWER YEAR LEVEL 
. include "../Data_Cleaning/Build_Equity_Issuance_Panel.do"
{txt}
{com}. 
. *************************************************************************
. ** FIRST GET IJ GLOBAL EQUITY RECORDS
. *************************************************************************
. //get borrowers mapped to internal ID
. use ../Raw/IJGlobal/transaction_borrower_records, clear
{txt}
{com}. rename Borrower_CompanyName Borrower_CompanyName_IJG
{res}{txt}
{com}. rename Borrower_ParentCompany Borrower_ParentCompany_IJG
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. joinby Borrower_CompanyName_IJG using ../Intermediate/ijglobal_borrowerid_map.dta
{txt}
{com}. keep TransactionId borrower_id 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(38 observations deleted)

{com}. merge m:1 borrower_id using ../Intermediate/borrower_file, keepusing(borrower_name) keep(3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           4,647{txt}  
{col 5}{hline 41}

{com}. tempfile ij_borrower_map
{txt}
{com}. save `ij_borrower_map'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000019{rm}
saved
as .dta format
{p_end}

{com}. 
. // Get IJ Global Equity Records
. use ../Raw/psedo/IJGlobal/equity_records_tranche_investor_level, clear
{txt}
{com}. 
. // CUT DOWN TO GCEL BORROWERS SAMPLE
. joinby TransactionId using `ij_borrower_map', unmatched(both) 
{txt}
{com}. egen has_merge = max(_merge==3), by(borrower_id)
{txt}
{com}. unique borrower_id if has_merge == 0 
{txt}Number of unique values of borrower_id is  {res}116
{txt}Number of records is  {res}16183
{txt}
{com}. keep if _merge == 3 
{txt}(19,118 observations deleted)

{com}. drop _merge has_merge
{txt}
{com}. gen year = yofd(transaction_date)
{txt}
{com}. egen companyid = group(CompanyName)
{txt}
{com}. gcollapse (sum) equity_amt_ijg = SponsorEquityUSDm (nunique) equity_n_trans_ijg = TransactionId equity_n_tranche_ijg = TrancheId equity_n_investors_ijg = companyid, by(borrower_id year)
{res}{txt}{res}{txt}{res}{txt}
{com}. 
. tempfile ijgequity 
{txt}
{com}. save `ijgequity'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001a{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. *************************************************************************
. ** FIRST PUBLIC EQUITY ISSUANCES FROM SDC PLATINUM
. *************************************************************************
. use ../Raw/psedo/clean_equity_issued, clear
{txt}
{com}. 
. joinby companyid using ../Raw/SDC/sdc_gcel_company_link
{txt}
{com}. 
. //limit to GCEL Sample
. keep if ~missing(GCELcompanyID)
{txt}(41,703 observations deleted)

{com}. 
.  //clean security type
. tab Type_of_Security, sort

{txt}Type_of_Securit {c |}
              y {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
Ord/Common Shs. {c |}{res}        421       52.23       52.23
{txt}          Units {c |}{res}        114       14.14       66.38
{txt}  Common Shares {c |}{res}         90       11.17       77.54
{txt}Class A Ord Shs {c |}{res}         56        6.95       84.49
{txt}Convertible Bds {c |}{res}         35        4.34       88.83
{txt}Ordinary Shares {c |}{res}         23        2.85       91.69
{txt}Exchangeable Bd {c |}{res}         13        1.61       93.30
{txt}Flow Through Sh {c |}{res}         12        1.49       94.79
{txt}Convertible Dbs {c |}{res}          7        0.87       95.66
{txt} Cvt Zero Bonds {c |}{res}          6        0.74       96.40
{txt} Class A Shares {c |}{res}          5        0.62       97.02
{txt}Convertible Nts {c |}{res}          4        0.50       97.52
{txt}            ADS {c |}{res}          3        0.37       97.89
{txt}    Cvt Pfd Shs {c |}{res}          3        0.37       98.26
{txt} Cvt Senior Nts {c |}{res}          3        0.37       98.64
{txt}Class H Ord Shs {c |}{res}          2        0.25       98.88
{txt}    Special Wts {c |}{res}          2        0.25       99.13
{txt} Class B Shares {c |}{res}          1        0.12       99.26
{txt}  Cont Conv Con {c |}{res}          1        0.12       99.38
{txt} Global Dep Rec {c |}{res}          1        0.12       99.50
{txt}  Ltd Prtnr Int {c |}{res}          1        0.12       99.63
{txt}  Preferred Shs {c |}{res}          1        0.12       99.75
{txt}Red Cvt Pfd Stk {c |}{res}          1        0.12       99.88
{txt}    Trust Units {c |}{res}          1        0.12      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}        806      100.00
{txt}
{com}. 
. gen security_type_clean = "Equity" if inlist(Type_of_Security,"Class H Ord Shs","Ordinary Shares","Class A Shares","Ord/Common Shs.", "Class A Ord Shs","Common Shares")
{txt}(209 missing values generated)

{com}. replace security_type_clean = "Units" if Type_of_Security == "Units"
{txt}(114 real changes made)

{com}. replace security_type_clean = "Debt" if regexm(Type_of_Security,"Bonds") | regexm(Type_of_Security,"Bds") | regexm(Type_of_Security,"Bd") | regexm(Type_of_Security,"Nts")
{txt}(61 real changes made)

{com}. replace security_type_clean = "Other" if missing(security_type_clean)
{txt}(34 real changes made)

{com}. 
. gen equity_amt_public = principal_amt
{txt}
{com}. gen equity_n_public = 1
{txt}
{com}. 
. gen year = yofd(Issue_Date)
{txt}
{com}. 
. gcollapse (sum) equity_*, by(GCELParentID year) labelformat(#sourcelabel#)
{res}{txt}{res}{txt}{res}{txt}
{com}. 
. //merge in borrower_id
. rename GCELParentID ParentID_GCEL 
{res}{txt}
{com}. merge m:1 ParentID_GCEL using ../Intermediate/borrower_file, keepusing(borrower_id) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             758
{txt}{col 9}from master{col 30}{res}               0{txt}  
{col 9}from using{col 30}{res}             758{txt}  

{col 5}Matched{col 30}{res}             615{txt}  
{col 5}{hline 41}

{com}. order borrower_id
{txt}
{com}. drop ParentID_GCEL
{txt}
{com}. tempfile sdcequity 
{txt}
{com}. save `sdcequity'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001b{rm}
saved
as .dta format
{p_end}

{com}. 
. *************************************************************************
. ** COMBINE IJG AND SDC EQUITY
. *************************************************************************
. use `sdcequity', clear
{txt}
{com}. 
. //fill out panel 
. ds borrower_id year, not
{txt}{col 1}equity_amt~c{col 15}equity_n_p~c

{com}. local fillvars `r(varlist)'
{txt}
{com}. gen orig_equity = 1 if ~missing(year)
{txt}(758 missing values generated)

{com}. replace year = 2009 if missing(year)
{txt}(758 real changes made)

{com}. tsset borrower_id year
{res}
{col 1}{txt:Panel variable: }{res:borrower_id}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:2009}}{txt: to }{res:{bind:2022}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. tsfill, full 
{txt}
{com}. foreach var of var `fillvars' {c -(}
{txt}  2{com}.         replace `var' = 0 if orig_equity == .
{txt}  3{com}. {c )-}
{txt}(12,475 real changes made)
(12,475 real changes made)

{com}. replace orig_equity = 0 if missing(orig_equity)
{txt}(12,475 real changes made)

{com}. label var orig_equity "has equity issue in this year"
{txt}
{com}. compress
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}orig_equity{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_public{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}byte{sf}
{txt}  (183,260 bytes saved)

{com}. 
. //merge in ijg equity 
. merge 1:1 borrower_id year using `ijgequity', keep(1 3)
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          12,378
{txt}{col 9}from master{col 30}{res}          12,378{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             712{txt}  (_merge==3)
{col 5}{hline 41}

{com}. foreach var of var *_ijg {c -(}
{txt}  2{com}.         replace `var' = 0 if _merge == 1
{txt}  3{com}. {c )-}
{txt}(12,378 real changes made)
(12,378 real changes made)
(12,378 real changes made)
(12,378 real changes made)

{com}. gen orig_equity_ijg = _merge == 3
{txt}
{com}. rename orig_equity orig_equity_public
{res}{txt}
{com}. gen orig_equity = orig_equity_ijg | orig_equity_public
{txt}
{com}. drop _merge
{txt}
{com}. 
. egen equity_amt_all = rowtotal(equity_amt_public equity_amt_ijg)
{txt}
{com}. egen equity_n_all = rowtotal(equity_n_public equity_n_investors_ijg)
{txt}
{com}. 
. save ../Intermediate/equity_issuance_panel, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/equity_issuance_panel.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/equity_issuance_panel.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. ** GENERATE ANALYSIS DATASET THAT RUNS REGRESSIONS
. include "../Data_Cleaning/Build_Panel_Firm_Year.do" 
{txt}
{com}. /*
> // PREPARE REGRESSION ANALYSIS DATASET
> */
. 
. 
. ***************************************************************************************************
. // merge securities/loan issuance panel with RHS variables
. ***************************************************************************************************
. use ../Intermediate/shift_shares, clear
{txt}
{com}. egen ss_pre_all_debt_ban_intnstyn1_mx = max(ss_pre_all_debt_banintsty_n1), by(borrower_id)
{txt}
{com}. keep borrower_id ss_pre_all_debt_ban_intnstyn1_mx
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(8,904 observations deleted)

{com}. tempfile bim 
{txt}
{com}. save `bim'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001c{rm}
saved
as .dta format
{p_end}

{com}. 
. use ../Intermediate/borrowing_panel, clear
{txt}
{com}. merge 1:1 borrower_id year using ../Intermediate/equity_issuance_panel
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:year} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          24,011
{txt}{col 9}from master{col 30}{res}          16,829{txt}  (_merge==1)
{col 9}from using{col 30}{res}           7,182{txt}  (_merge==2)

{col 5}Matched{col 30}{res}           5,908{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen equitypanel = _merge == 3
{txt}
{com}. drop _merge
{txt}
{com}. merge 1:1 borrower_id year using ../Intermediate/shift_shares, keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           9,328{txt}  
{col 5}{hline 41}

{com}. merge m:1 borrower_id using ../Intermediate/borrower_chars, keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             110
{txt}{col 9}from master{col 30}{res}             110{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}           9,218{txt}  
{col 5}{hline 41}

{com}. merge 1:1 borrower_id year using ../Raw/psedo/orbis_panel_borrower, keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           6,702
{txt}{col 9}from master{col 30}{res}           6,702{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}           2,626{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen has_orbis = _merge == 3
{txt}
{com}. drop _merge
{txt}
{com}. order borrower_name, after(borrower_id)
{txt}
{com}. drop if year >= 2022 
{txt}(3,816 observations deleted)

{com}. merge m:1 borrower_id using `bim', keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           5,512{txt}  
{col 5}{hline 41}

{com}. 
. ***************************************************************************************************
. 
. 
. 
. ***************************************************************************************************
. //create LHS variables
. ***************************************************************************************************
. 
. //create logs
. foreach var of var borr_* {c -(}
{txt}  2{com}.     local stub = subinstr("`var'","borr_","",.)
{txt}  3{com}.     gen log_`stub' = log(1+`var')
{txt}  4{com}.     gen logim_`stub' = log(`var')  //intensive margin
{txt}  5{com}. {c )-}
{txt}(3,623 missing values generated)
(5,001 missing values generated)
(4,090 missing values generated)
(4,003 missing values generated)
(5,136 missing values generated)
(4,295 missing values generated)
(3,860 missing values generated)
(4,424 missing values generated)
(4,498 missing values generated)
(5,085 missing values generated)
(5,454 missing values generated)
(5,476 missing values generated)
(4,800 missing values generated)

{com}. 
. gen borrow=(borr_debt!=0)
{txt}
{com}. gen log_ltd = log(LTdebt)
{txt}(2,886 missing values generated)

{com}. gen log_size = log(Totassets)
{txt}(2,886 missing values generated)

{com}. gen log_lev = log_ltd-log_size
{txt}(2,886 missing values generated)

{com}. gen log_equity_public = log(1+equity_amt_public)
{txt}(65 missing values generated)

{com}. 
. 
. 
. gen post15 = year > 2015
{txt}
{com}. gen log_debt_banks = log(1+borr_debt -  borr_debt_non_bank)
{txt}
{com}. egen total_non_bank = total(borr_debt_non_bank) 
{txt}
{com}. egen total_bank = total(borr_debt) 
{txt}
{com}. gen borr_debt_norel_all_pre =  borr_debt-borr_debt_rel_all_pre
{txt}
{com}. 
. //dollars of debt from anyone without policies 
. gen log_debt_nopol = log(1+borr_debt -  borr_debt_has_coded_policy)
{txt}
{com}. gen log_debt_noactivepol = log(1+borr_debt -  borr_debt_actvpol)
{txt}
{com}. gen log_debt_norel_all_pre =  log(1+borr_debt_norel_all_pre)
{txt}
{com}. 
. ***************************************************************************************************
. 
. 
. ***************************************************************************************************
. //define geographic variables
. ***************************************************************************************************
. tab Continent, mis

      {txt}Continent {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
                {c |}{res}         65        1.18        1.18
{txt}         Africa {c |}{res}        221        4.01        5.19
{txt}           Asia {c |}{res}      3,016       54.72       59.91
{txt}    Australasia {c |}{res}        429        7.78       67.69
{txt}         Europe {c |}{res}        689       12.50       80.19
{txt}   Indian Ocean {c |}{res}         13        0.24       80.42
{txt}  North America {c |}{res}      1,001       18.16       98.58
{txt}  South America {c |}{res}         78        1.42      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}      5,512      100.00
{txt}
{com}. encode Continent, gen(cont)
{txt}
{com}. encode Continent, gen(continent_i)
{txt}
{com}. 
. gen region = "Europe" if Continent == "Europe"
{txt}(4,823 missing values generated)

{com}. replace region = "North America" if Continent == "North America"
{txt}variable {bf}{res}region{sf}{txt} was {bf}{res}str6{sf}{txt} now {bf}{res}str13{sf}
{txt}(1,001 real changes made)

{com}. replace region = "Asia" if Continent == "Asia"
{txt}(3,016 real changes made)

{com}. replace region = "AusNZ" if Continent == "Australasia"
{txt}(429 real changes made)

{com}. replace region = "Other" if missing(region)
{txt}(377 real changes made)

{com}. encode region, gen(region_i)
{txt}
{com}. 
. encode Country, gen(count)
{txt}
{com}. encode Country, gen(country_i) 
{txt}
{com}. ***************************************************************************************************
. 
. 
. 
. ***************************************************************************************************
. //define other demographic variables
. ***************************************************************************************************
. xtile decile_assets   = Totassets, nq(10)
{txt}
{com}. xtile median_assets   = Totassets, nq(2)
{txt}
{com}. egen mean_assets = mean(Totassets), by(borrower_id)
{txt}(1,313 missing values generated)

{com}. xtile median_assets_mean   = mean_assets, nq(2)
{txt}
{com}. gen expansion = expansion_mining|expansion_infrastructure|expansion_power
{txt}
{com}. 
. //Share of Coal Activity variable
. gen share = CoalSharePower
{txt}(1,950 missing values generated)

{com}. replace share = CoalFracRev if missing(share)
{txt}(1,378 real changes made)

{com}. mdesc share

{txt}    Variable{col 17}{c |}     Missing          Total     Percent Missing
{hline 16}{c +}{hline 47}
          share{col 17}{c |} {res}        572          5,512          10.38
{txt}{hline 16}{c +}{hline 47}

{com}. label var share "Corporate Coal Share (power or revenue)"
{txt}
{com}. 
. gen share_revfst = CoalFracRev
{txt}(1,001 missing values generated)

{com}. replace share_revfst = CoalSharePower if missing(share_revfst)
{txt}(429 real changes made)

{com}. 
. gen share_coalpower = CoalSharePower
{txt}(1,950 missing values generated)

{com}. replace share_coalpower = 0 if missing(share_coalpower)
{txt}(1,950 real changes made)

{com}. gen share_coalrev = CoalFracRev
{txt}(1,001 missing values generated)

{com}. replace share_coalrev = 0 if missing(share_coalrev)
{txt}(1,001 real changes made)

{com}. ***************************************************************************************************
. 
. 
. 
. ***************************************************************************************************
. 
. 
. 
. ***************************************************************************************************
. //Set up sample limitations
. ***************************************************************************************************
. 
. //define aggregate pre period borrowings by type
. gen period_pre =  (year<=2013 & year >= 2009)
{txt}
{com}. 
. foreach period in pre {c -(}
{txt}  2{com}. foreach dtype in debt  {c -(}
{txt}  3{com}.     egen aggborr_`period'_`dtype' = sum(borr_`dtype'*period_`period'), by(borrower_id)
{txt}  4{com}. {c )-}
{txt}  5{com}. {c )-}
{txt}
{com}. 
. xtile quintile_assets = mean_assets if aggborr_pre_debt > 0 , nq(5)
{txt}
{com}. replace  quintile_assets=0 if missing(quintile_assets)
{txt}(2,405 real changes made)

{com}. 
. 
. ***************************************************************************************************
. 
. ***************************************************************************************************
. //Set up cross sectional variables
. ***************************************************************************************************
. bys borrower_id: gen fb = _n == 1
{txt}
{com}. gen pos_debt = borr_debt > 0 if ~missing(borr_debt)
{txt}
{com}. egen med_share = median(share) if ~missing(share)
{txt}(572 missing values generated)

{com}. gen highshare = share > med_share if ~missing(share)
{txt}(572 missing values generated)

{com}. 
. 
. 
. sum ss_pre_all_debt_banintsty_n1 if aggborr_pre_debt > 0

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ss_pre_all~1 {c |}{res}      3,679    .0546317    .1269516          0          1
{txt}
{com}. gen ss_pre_all_debt_banintsty_n1_sd = ss_pre_all_debt_banintsty_n1/`r(sd)'
{txt}
{com}. 
. 
. label define medassets 1 "Small Firm" 2 "Large Firm"
{txt}
{com}. label values median_assets_mean medassets
{txt}
{com}. label define medcoal 0 "Low Coal Share" 1 "High Coal Share", replace
{txt}
{com}. label values highshare medcoal
{txt}
{com}. label var ss_pre_all_debt_banintsty_n1_sd "$\text{c -(}Bank Exit Exposure{c )-}_{c -(}f,t{c )-}$"
{txt}
{com}. label var highshare "High Coal Share"
{txt}
{com}. label var coal_industry_mining "Mining Company"
{txt}
{com}. 
. 
. 
. save ../Intermediate/analysis_panel_firmyear, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/analysis_panel_firmyear.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/analysis_panel_firmyear.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. ** GENERATE PLANT LEVEL PANEL  
. include "../Data_Cleaning/Build_Plant_Year_Panel.do" 
{txt}
{com}. 
. 
. 
. *********************************************************
. *
. *merge to main firm-level panel dataset
. *
. *********************************************************
. use "../Raw/GCEL_Company_list/fuzzy_matching/GCEL_Parent_Id", clear
{txt}
{com}. keep GCELcompanyID Parentid
{txt}
{com}. rename Parentid ParentID_GCEL
{res}{txt}
{com}. tempfile GCEL_parent_company
{txt}
{com}. save `GCEL_parent_company'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001d{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Intermediate/analysis_panel_firmyear.dta",clear
{txt}
{com}. joinby ParentID_GCEL using `GCEL_parent_company'
{txt}
{com}. tempfile company_year_tomerge
{txt}
{com}. save `company_year_tomerge'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001e{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Raw/GCEL_Company_list/fuzzy_matching/GCPT_GCEL_merge.dta",clear  
{txt}
{com}. keep TrackerID GCELcompanyID
{txt}
{com}. tempfile GCEL_GCPT
{txt}
{com}. save `GCEL_GCPT'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001f{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use "../Intermediate/gcpt_clean.dta", clear
{txt}
{com}. merge m:1 TrackerID using `GCEL_GCPT', nogen keep(3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           4,110{txt}  
{col 5}{hline 41}

{com}. duplicates tag Plant Unit, gen(tag)

{p 0 4}{txt}Duplicates in terms of {res} Plant Unit{p_end}
{txt}
{com}. drop if tag >= 1 
{txt}(12 observations deleted)

{com}. 
. 
. *EIA USA Data
. merge 1:1 Plant Unit using "../Intermediate/usa_eia_generator_data.dta", keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           3,487
{txt}{col 9}from master{col 30}{res}           3,487{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             611{txt}  
{col 5}{hline 41}

{com}. 
. save "../Intermediate/analysis_plant_plans.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/analysis_plant_plans.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/analysis_plant_plans.dta{rm}
saved
{p_end}

{com}. 
. *Bring in Wiki data
. include "../Data_Cleaning/clean_gem_retirement_scraping.do" 
{txt}
{com}. 
. use ../Intermediate/analysis_plant_plans, clear
{txt}
{com}. bys TrackerID: gen cx_plant = _n == 1
{txt}
{com}. keep if RetiredYr >= 2015 & RetiredYr <= 2022 & operating_2014 == 1 & gcpt_earl_annoucement__rtr_yr  == . & cx_plant == 1
{txt}(3,759 observations deleted)

{com}. keep TrackerID TrackerLOC Plant Unit RetiredYr Wikipage 
{txt}
{com}. replace Plant = lower(Plant)
{txt}(339 real changes made)

{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. tempfile plants 
{txt}
{com}. save `plants'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001g{rm}
saved
as .dta format
{p_end}

{com}. 
. //below data file corresponds to all the above plants wiki pages run through ChatGPT to extract retirement announcements
. import excel using ../Raw/GEM/GEM-Wiki-ChatGPT-Extract-Announcements.xlsx, firstrow  clear
{res}{text}(5 vars, 443 obs)

{com}. rename PlantName Plant
{res}{txt}
{com}. replace Plant = lower(Plant)
{txt}(436 real changes made)

{com}. 
. merge 1:1 Plant Unit using `plants', nogen keep(3)
{res}{txt}{p 0 7 2}
(variable
{bf:Plant} was {bf:str43}, now {bf:str69} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Unit} was {bf:str19}, now {bf:str72} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}             339{txt}  
{col 5}{hline 41}

{com}. 
. 
. rename AnnouncementDate AnnouncementDate_gem_wiki
{res}{txt}
{com}. rename PlannedRetirementDate PlannedRetirementDate_gem_wiki
{res}{txt}
{com}. rename ActualRetirementDate ActualRetirementDate_gem_wiki 
{res}{txt}
{com}. 
. //get clean announcement year 
. gen ann_year = word(AnnouncementDate_gem_wiki,-1)
{txt}
{com}. replace ann_year = word(AnnouncementDate_gem_wiki,1) if ann_year == "(proposal)"
{txt}(2 real changes made)

{com}. replace ann_year = ""  if inlist(AnnouncementDate_gem_wiki,"Not specified","Not Specified","Unknown")
{txt}(143 real changes made)

{com}. destring ann_year, replace
{txt}ann_year: all characters numeric; {res}replaced {txt}as {res}int
{txt}(143 missing values generated)
{res}{txt}
{com}. 
. //get clean plannt ret year 
. gen plan_year = word(PlannedRetirementDate_gem_wiki,-1)
{txt}
{com}. replace plan_year = ""  if inlist(PlannedRetirementDate_gem_wiki,"Not specified","Not Specified","Unknown")
{txt}(149 real changes made)

{com}. replace plan_year = word(PlannedRetirementDate_gem_wiki,1) if regexm(plan_year,"(planned)") | regexm(plan_year,"conversion") 
{txt}(5 real changes made)

{com}. replace plan_year = word(PlannedRetirementDate_gem_wiki,1) if regexm(plan_year,"mothballing")
{txt}(1 real change made)

{com}. destring plan_year, force replace
{txt}plan_year: all characters numeric; {res}replaced {txt}as {res}int
{txt}(149 missing values generated)
{res}{txt}
{com}. rename plan_year plan_ret_year_gem_wiki
{res}{txt}
{com}. rename ann_year announce_ret_year_gem_wiki
{res}{txt}
{com}. 
. keep TrackerID   *_gem_wiki
{txt}
{com}. order TrackerID
{txt}
{com}. compress
  {txt}variable {bf}{res}ActualRetirementDate_gem_wiki{sf}{txt} was {bf}{res}str30{sf}{txt} now {bf}{res}str22{sf}
{txt}  (2,712 bytes saved)

{com}. 
. save ../Intermediate/gem_wiki_announcement_match, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/gem_wiki_announcement_match.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/gem_wiki_announcement_match.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. use "../Intermediate/analysis_plant_plans.dta", clear 
{txt}
{com}. merge 1:1 TrackerID using "../Intermediate/gem_wiki_announcement_match", keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           3,759
{txt}{col 9}from master{col 30}{res}           3,759{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             339{txt}  
{col 5}{hline 41}

{com}. 
. **convert to 09-21 panel data format
. gen start_year = 2009
{txt}
{com}. gen end_year = 2021
{txt}
{com}. expand end_year - start_year + 1
{txt}(49,176 observations created)

{com}. by TrackerID, sort: gen year = start_year + _n - 1
{txt}
{com}. drop *_year
{txt}
{com}. sort TrackerID year
{txt}
{com}. 
. joinby GCELcompanyID year using `company_year_tomerge'
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(65 observations deleted)

{com}. order TrackerID ParentID_GCEL GCELcompanyID year
{txt}
{com}. 
. *********************************************************
. *
. *CLEAN UP PANEL FOR ANALYSIS
. *
. *********************************************************
. 
. *Convert all first_dates to year level data
. foreach var of varlist first_date_* {c -(}
{txt}  2{com}.     gen `var'_year = year(`var')
{txt}  3{com}.         drop `var'
{txt}  4{com}. {c )-}
{txt}(48,516 missing values generated)
(44,304 missing values generated)
(47,788 missing values generated)
(51,974 missing values generated)
(10,348 missing values generated)
(50,375 missing values generated)
(39,078 missing values generated)
(46,033 missing values generated)
(48,438 missing values generated)

{com}. 
. egen plant_parent_id=group(TrackerID ParentID_GCEL)
{txt}
{com}. egen plant_id = group(TrackerID)
{txt}
{com}. egen facility_id = group(TrackerLOC)
{txt}
{com}. egen parent_id = group(ParentID_GCEL)
{res}{txt}
{com}. gen plant_age = year-first_date_Operating_year
{txt}(10,348 missing values generated)

{com}. 
. 
. label var plant_age "Plant Age"
{txt}
{com}. 
. encode Coaltype, gen(coaltype_i)
{txt}
{com}. gen coaltype_anth = regexm(Coaltype,"anth") | regexm(Coaltype,"hard")
{txt}
{com}. gen coaltype_bitum = regexm(Coaltype,"bitum")
{txt}
{com}. gen coaltype_lignite = regexm(Coaltype,"lignite")
{txt}
{com}. gen coaltype_subbit = regexm(Coaltype,"sub-bit")
{txt}
{com}. gen coaltype_broad = "Anthracite" if coaltype_anth == 1
{txt}(51,584 missing values generated)

{com}. replace coaltype_broad = "Bituminous" if coaltype_bitum == 1
{txt}(24,167 real changes made)

{com}. replace coaltype_broad = "Sub-Bituminous" if coaltype_subbit == 1
{txt}variable {bf}{res}coaltype_broad{sf}{txt} was {bf}{res}str10{sf}{txt} now {bf}{res}str14{sf}
{txt}(7,332 real changes made)

{com}. replace coaltype_broad = "Lignite" if coaltype_lignite == 1
{txt}(3,575 real changes made)

{com}. replace coaltype_broad = "Unknown" if missing(coaltype_broad)
{txt}(19,006 real changes made)

{com}. encode coaltype_broad, gen(coaltypebroad_i)
{txt}
{com}. 
. 
. *********************************************************
. *
. *Defining Retirement and Mothball
. *
. *********************************************************
. /*first_date_Retired and Retired Yr only differ for plants G101416:G101421, but first_date_Retired has slightly more data*/
. 
. *Retire (This definition excludes mothballed plants)
. gen retired = year >= first_date_Retired_year
{txt}
{com}. 
. *distressed includes plants that are retired or mothballed since 2014
. gen distressed = year >= first_date_Retired_year | year >= first_date_Mothballed_year
{txt}
{com}. 
. *********************************************************
. *
. *Defining Announcement, Shelved, and Cancelation
. *
. *********************************************************
. 
. gen canceled = year >= first_date_Cancelled_year
{txt}
{com}. gen constructed = year >= first_date_Operating_year
{txt}
{com}. gen can_or_retired = max(canceled, retired)
{txt}
{com}. 
. 
. 
. *********************************************************
. *
. *Creating cross sectional treatment varaibles 
. *
. *********************************************************
. gen assets_2015 = Totassets if year == 2015
{txt}(49,691 missing values generated)

{com}. bys borrower_id (assets_2015): replace assets_2015 = assets_2015[1]
{txt}(46116 real changes made)

{com}. egen hassomeasset = max(~missing(Totassets)), by(borrower_id)
{txt}
{com}. egen assets_cx = median(Totassets), by(plant_parent_id)
{txt}(1,989 missing values generated)

{com}. 
. xtile decile_assets_2015 = assets_2015, n(10)
{txt}
{com}. gen large_firm = decile_assets_2015 >= 5 if ~missing(decile_assets_2015)
{txt}(3,575 missing values generated)

{com}. gen share_high = share > 0.588 if ~missing(share)
{txt}(1,430 missing values generated)

{com}. gen share_low = 1-share_high
{txt}(1,430 missing values generated)

{com}. 
. 
. save "../Intermediate/analysis_panel_plantyear.dta",replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/analysis_panel_plantyear.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/analysis_panel_plantyear.dta{rm}
saved
{p_end}

{com}. 
. 
. ******************************************************
. ***Setting up Panel for Regressions
. ******************************************************
. use "../Intermediate/analysis_panel_plantyear.dta", clear
{txt}
{com}. 
. bys plant_parent_id: gen cx = _n == 1
{txt}
{com}. sum ss_pre_all_debt_ban_intnstyn1_mx if cx == 1 & ss_pre_all_debt_ban_intnstyn1_mx > 0, de

              {txt}ss_pre_all_debt_ban_intnstyn1_mx
{hline 61}
      Percentiles      Smallest
 1%    {res} .0086058       .0032768
{txt} 5%    {res} .0086058       .0051019
{txt}10%    {res} .0286446       .0051019       {txt}Obs         {res}      3,300
{txt}25%    {res} .0975584       .0051019       {txt}Sum of wgt. {res}      3,300

{txt}50%    {res}  .266658                      {txt}Mean          {res} .3004473
                        {txt}Largest       Std. dev.     {res} .2255715
{txt}75%    {res} .4544897              1
{txt}90%    {res} .5655581              1       {txt}Variance      {res} .0508825
{txt}95%    {res} .6942328              1       {txt}Skewness      {res} .7293177
{txt}99%    {res}        1              1       {txt}Kurtosis      {res} 3.484698
{txt}
{com}. gen ban_intensity_max_sd = ss_pre_all_debt_ban_intnstyn1_mx/`r(sd)'
{txt}
{com}. gen big_plant = CapacityMW >= 500
{txt}
{com}. gen small_firm = median_assets_mean == 1
{txt}
{com}. 
. rename post15 post2015 
{res}{txt}
{com}. label var post2015 "$ Year \geq 2015$"
{txt}
{com}. label var large_firm "Large Firm"
{txt}
{com}. label var share_low "Low Coal Share"
{txt}
{com}. label var ban_intensity_max_sd "$\text{c -(}Bank Exit Exposure (Max){c )-}_{c -(}f{c )-}$"
{txt}
{com}. label var small_firm "Small Firm"
{txt}
{com}. label var big_plant "Large Plant"
{txt}
{com}. 
. 
. 
. save ../Intermediate/plant_year_panel_clean, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/plant_year_panel_clean.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/plant_year_panel_clean.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. ** GENERATE PLANT EMISSIONS DATA
. include "../Data_Cleaning/Build_Plant_Emissions.do" 
{txt}
{com}. 
. 
. **********************************************************************
. **US plants
. **
. ********************************************************************
. 
. ********************************************************************************
. * EIA 923 Forms 
. ********************************************************************************
. 
. drop _all
{txt}
{com}. tempfile cumulator
{txt}
{com}. quietly save `cumulator', emptyok
{txt}
{com}. forval year=2010(1)2022{c -(}
{txt}  2{com}. 
.         if `year' == 2022 {c -(}
{txt}  3{com}.                 import excel "../Raw/EIA/EIA_923/f923_2022/EIA923_Schedules_2_3_4_5_M_12_2022_Final.xlsx", clear firstrow cellrange(A6)
{txt}  4{com}.                 destring YEAR, replace
{txt}  5{com}.                 append using `cumulator', force
{txt}  6{com}.                 quietly save `cumulator', replace
{txt}  7{com}.         {c )-}
{txt}  8{com}.         else if `year' == 2010 {c -(}
{txt}  9{com}.                 import excel "../Raw/EIA/EIA_923/f923_2010/EIA923 SCHEDULES 2_3_4_5 Final 2010.xls", clear firstrow cellrange(A8)
{txt} 10{com}.                 rename Year YEAR
{txt} 11{com}.                 append using `cumulator', force
{txt} 12{com}.                 quietly save `cumulator', replace
{txt} 13{com}.         {c )-}
{txt} 14{com}.         else if `year' == 2011 {c -(}
{txt} 15{com}.                 import excel "../Raw/EIA/EIA_923/f923_`year'/EIA923_Schedules_2_3_4_5_`year'_Final_Revision.xlsx", clear firstrow cellrange(A6)
{txt} 16{com}.                 destring YEAR, replace
{txt} 17{com}.                 append using `cumulator', force
{txt} 18{com}.                 quietly save `cumulator', replace
{txt} 19{com}.         {c )-}
{txt} 20{com}.         else if `year' == 2013 {c -(}
{txt} 21{com}.                 import excel "../Raw/EIA/EIA_923/f923_`year'/EIA923_Schedules_2_3_4_5_`year'_Final_Revision.xlsx", clear firstrow cellrange(A6)
{txt} 22{com}.                 destring YEAR, replace
{txt} 23{com}.                 append using `cumulator', force
{txt} 24{com}.                 quietly save `cumulator', replace
{txt} 25{com}.         {c )-}
{txt} 26{com}.         else {c -(}
{txt} 27{com}.                 import excel "../Raw/EIA/EIA_923/f923_`year'/EIA923_Schedules_2_3_4_5_M_12_`year'_Final_Revision.xlsx", clear firstrow cellrange(A6)
{txt} 28{com}.                 destring YEAR, replace
{txt} 29{com}.                 append using `cumulator', force
{txt} 30{com}.                 quietly save `cumulator', replace
{txt} 31{com}.         {c )-}
{txt} 32{com}.                 
. {c )-}
{res}{text}(97 vars, 10,108 obs)
{res}{text}(97 vars, 10,461 obs)
YEAR already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:PlantName} was {bf:str42}, now {bf:str45} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 11,004 obs)
YEAR already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:PlantName} was {bf:str42}, now {bf:str45} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 11,466 obs)
YEAR already numeric; no {res}replace
{text}(97 vars, 12,172 obs)
YEAR: all characters numeric; {res}replaced {txt}as {res}int
{txt}(263 missing values generated)
{res}{txt}{p 0 7 2}
(note: variable
{bf:NuclearUnitId} was byte in the using data, but will be
str1 now)
{p_end}
{p 0 7 2}
(note: variable
{bf:OperatorId} was long in the using data, but will be
str5 now)
{p_end}
{p 0 7 2}
(variable
{bf:OperatorName} was {bf:str48}, now {bf:str50} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityOctober} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 12,450 obs)
YEAR: all characters numeric; {res}replaced {txt}as {res}int
{txt}(387 missing values generated)
{res}{txt}{p 0 7 2}
(variable
{bf:PlantName} was {bf:str45}, now {bf:str48} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:OperatorName} was {bf:str48}, now {bf:str50} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityOctober} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 12,864 obs)
YEAR: all characters numeric; {res}replaced {txt}as {res}int
{txt}(129 missing values generated)
{res}{txt}{p 0 7 2}
(variable
{bf:PlantName} was {bf:str45}, now {bf:str48} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityNovember} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:NetgenAugust} was {bf:str17}, now {bf:str18} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 13,379 obs)
YEAR: all characters numeric; {res}replaced {txt}as {res}int
{txt}(195 missing values generated)
{res}{txt}{p 0 7 2}
(variable
{bf:PlantName} was {bf:str45}, now {bf:str48} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 13,959 obs)
YEAR already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:Elec_QuantityFebruary} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityApril} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityNovember} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 14,517 obs)
YEAR already numeric; no {res}replace
{text}(97 vars, 15,115 obs)
YEAR already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:Elec_QuantitySeptember} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 15,796 obs)
YEAR already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:OperatorName} was {bf:str51}, now {bf:str61} to accommodate using data's values)
{p_end}
{res}{text}(97 vars, 16,453 obs)
YEAR already numeric; no {res}replace
{txt}{p 0 7 2}
(variable
{bf:OperatorName} was {bf:str57}, now {bf:str61} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityFebruary} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityMarch} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Elec_QuantityApril} was {bf:str7}, now {bf:str8} to accommodate using data's values)
{p_end}

{com}. 
. 
. //Collapsing Units to a Plant Level
. collapse (sum) NetGenerationMegawatthours, by(YEAR PlantName PlantState)
{res}{txt}
{com}. rename (PlantName YEAR) (facility_name year)
{res}{txt}
{com}. 
. 
. //Dropping some non-coal plants
. drop if facility_name == "State-Fuel Level Increment" | facility_name == "Consumer Operations LLC"
{txt}(290 observations deleted)

{com}. drop if strpos(facility_name, "Dam") | strpos(facility_name, "Solar")
{txt}(17,277 observations deleted)

{com}. drop if inlist(facility_name, "Halifax", "High Plains", "Drop 5", "Richland", "Seminole") | ///
>           inlist(facility_name, "Bliss", "Dover", "Cedar Creek", "Bear Creek", "South Plant")
{txt}(166 observations deleted)

{com}. drop if facility_name == "Marshall" & PlantState == "AK"
{txt}(8 observations deleted)

{com}. drop if facility_name == "Oak Grove"
{txt}(13 observations deleted)

{com}. drop if facility_name == "Indian River"
{txt}(4 observations deleted)

{com}. drop if facility_name == "Lake Road"
{txt}(2 observations deleted)

{com}. drop if facility_name == "Niles"
{txt}(9 observations deleted)

{com}. 
. *Manually doing the rest, in cases where there are no matches, we put  XXXX.
. replace facility_name = "AIR PRODUCTS MANUFACTURING CORP STOCKTON COGEN" if facility_name == "Ingredion Stockton" 
{txt}(8 real changes made)

{com}. replace facility_name = "Cliffside" if facility_name == "James E. Rogers Energy Complex" 
{txt}(11 real changes made)

{com}. replace facility_name = "Iatan" if facility_name == "Iatan"
{txt}(0 real changes made)

{com}. replace facility_name = "John S. Cooper" if facility_name == "Cooper"
{txt}(13 real changes made)

{com}. replace facility_name = "La Cygne" if facility_name == "La Cygne"
{txt}(0 real changes made)

{com}. replace facility_name = "NRG Dunkirk Power" if facility_name == "Dunkirk Generating Plant"
{txt}(7 real changes made)

{com}. replace facility_name = "Powell Avenue Steam Plant" if facility_name == "XXXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Marshall" if facility_name == "Marshall (NC)"            
{txt}(11 real changes made)

{com}. replace facility_name = "Oak Grove" if facility_name == "Oak Grove (TX)"
{txt}(10 real changes made)

{com}. replace facility_name = "Wygen I" if facility_name == "Wygen 1"
{txt}(13 real changes made)

{com}. replace facility_name = "Wygen II" if facility_name == "Wygen 2"
{txt}(13 real changes made)

{com}. replace facility_name = "Wygen III" if facility_name == "Wygen 3"
{txt}(0 real changes made)

{com}. replace facility_name = "A B Brown Generating Station" if facility_name == "A B Brown"
{txt}(13 real changes made)

{com}. replace facility_name = "Asheville Steam Electric Plant" if facility_name == "Asheville"
{txt}(13 real changes made)

{com}. replace facility_name = "BLACK HILLS CORPORATION - BEN FRENCH POWER PLANT" if facility_name == "Ben French"
{txt}(13 real changes made)

{com}. replace facility_name = "BLACK HILLS ELECTRIC- W.N. CLARK STATION" if facility_name == "Clark (SD)"
{txt}(11 real changes made)

{com}. replace facility_name = "Bailly Generating Station" if facility_name == "Bailly"
{txt}(11 real changes made)

{com}. replace facility_name = "Boswell Energy Center" if facility_name == "Clay Boswell"
{txt}(13 real changes made)

{com}. replace facility_name = "Brandon Shores LLC" if facility_name == "Brandon Shores"
{txt}(13 real changes made)

{com}. replace facility_name = "Bremo Power Station" if facility_name == "Bremo Bluff"
{txt}(10 real changes made)

{com}. replace facility_name = "Brunner Island, LLC" if facility_name == "Brunner Island"
{txt}(10 real changes made)

{com}. replace facility_name = "CONSOL PA COAL CO LLC/BAILEY PREP PLT" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Cape Fear Steam Electric Plant" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Chesterfield Power Station" if facility_name == "Chesterfield"
{txt}(13 real changes made)

{com}. replace facility_name = "Cliffside" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Clover Power Station" if facility_name == "Clover"
{txt}(13 real changes made)

{com}. replace facility_name = "Columbia" if facility_name == "Columbia (WI)"
{txt}(11 real changes made)

{com}. replace facility_name = "Comanche (470)" if facility_name == "Comanche (CO)"
{txt}(11 real changes made)

{com}. replace facility_name = "Cope Station" if facility_name == "Cope"
{txt}(13 real changes made)

{com}. replace facility_name = "Coronado Generating Station" if facility_name == "Coronado"
{txt}(13 real changes made)

{com}. replace facility_name = "Craig" if facility_name == "Craig (CO)"
{txt}(11 real changes made)

{com}. replace facility_name = "Crystal River Power Plant" if facility_name == "Crystal River"
{txt}(13 real changes made)

{com}. replace facility_name = "Dugout Canyon Mine" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "E.W. Brown" if facility_name == "E W Brown"
{txt}(13 real changes made)

{com}. replace facility_name = "Edgewater (4050)" if facility_name == "Edgewater"
{txt}(13 real changes made)

{com}. replace facility_name = "Elrama" if facility_name == "Elrama Power Plant"
{txt}(5 real changes made)

{com}. replace facility_name = "F B Culley Generating Station" if facility_name == "F B Culley"
{txt}(13 real changes made)

{com}. replace facility_name = "FRUIT OF THE LOOM - JAMESTOWN" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Fort Martin Power Station" if facility_name == "FirstEnergy Fort Martin Power Station"
{txt}(13 real changes made)

{com}. replace facility_name = "Gerald Gentleman Station" if facility_name == "Gerald Gentleman"
{txt}(13 real changes made)

{com}. replace facility_name = "H A Wagner LLC" if facility_name == "Herbert A Wagner"
{txt}(13 real changes made)

{com}. replace facility_name = "H B Robinson / Darlington Electric Power Plant" if facility_name == "H B Robinson"
{txt}(13 real changes made)

{com}. replace facility_name = "H F Lee Steam Electric Plant" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Harbor Beach" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Harrington Station" if facility_name == "Harrington"
{txt}(13 real changes made)

{com}. replace facility_name = "Harrison Power Station" if facility_name == "FirstEnergy Harrison Power Station"
{txt}(13 real changes made)

{com}. replace facility_name = "Hibbard Energy Center" if facility_name == "M L Hibbard"
{txt}(13 real changes made)

{com}. replace facility_name = "Huntley Power" if facility_name == "C R Huntley Generating Station"
{txt}(7 real changes made)

{com}. replace facility_name = "Hutsonville" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Iatan Generating Station" if facility_name == "Iatan"
{txt}(13 real changes made)

{com}. replace facility_name = "Indian River" if facility_name == "Indian River Generating Station"
{txt}(13 real changes made)

{com}. replace facility_name = "Intermountain Generating Station" if facility_name == "Intermountain Power Project"
{txt}(13 real changes made)

{com}. replace facility_name = "J E Corette" if facility_name == "J E Corette Plant"
{txt}(6 real changes made)

{com}. replace facility_name = "John S. Cooper" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Johns Manville" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Kincaid Generation, LLC" if facility_name == "Kincaid Generation LLC"
{txt}(13 real changes made)

{com}. replace facility_name = "L V Sutton Steam Electric Plant" if facility_name == "L V Sutton Combined Cycle"
{txt}(10 real changes made)

{com}. replace facility_name = "La Cygne Generating Station" if facility_name == "La Cygne"
{txt}(13 real changes made)

{com}. replace facility_name = "Lake Road Generating Station" if facility_name == "Lake Road Generating Plant"
{txt}(13 real changes made)

{com}. replace facility_name = "Laramie River" if facility_name == "Laramie River Station"
{txt}(13 real changes made)

{com}. replace facility_name = "Laskin Energy Center" if facility_name == "Syl Laskin"
{txt}(13 real changes made)

{com}. replace facility_name = "Longview Power" if facility_name == "Longview Power Plant"
{txt}(9 real changes made)

{com}. replace facility_name = "Longview Power" if facility_name == "Longview Power LLC"
{txt}(3 real changes made)

{com}. replace facility_name = "METTIKI COAL, LLC" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "MOBILE ENERGY SERVICES LLC" if facility_name == "Mobile Energy Services LLC"
{txt}(10 real changes made)

{com}. replace facility_name = "MT POSO COGENERATION COMPANY, LLC" if facility_name == "Mt Poso Cogeneration"
{txt}(13 real changes made)

{com}. replace facility_name = "Mayo Electric Generating Plant" if facility_name == "Mayo"
{txt}(13 real changes made)

{com}. replace facility_name = "McClure River Prep Plant" if facility_name == "McClure" //Big 
{txt}(13 real changes made)

{com}. replace facility_name = "Meredosia" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Miami Fort Generating Station" if facility_name == "Miami Fort"
{txt}(13 real changes made)

{com}. replace facility_name = "Michigan City Generating Station" if facility_name == "Michigan City"
{txt}(13 real changes made)

{com}. replace facility_name = "Mill Creek" if facility_name == "Mill Creek (KY)"
{txt}(11 real changes made)

{com}. replace facility_name = "Monongalia County Preparation Plant" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Monroe" if facility_name == "Monroe (MI)"
{txt}(11 real changes made)

{com}. replace facility_name = "Montour, LLC" if facility_name == "TalenEnergy Montour"
{txt}(9 real changes made)

{com}. replace facility_name = "Mount Storm Power Station" if facility_name == "Mt Storm"
{txt}(13 real changes made)

{com}. replace facility_name = "NRG Dunkirk Power" if facility_name == "NRG Dunkirk Power"
{txt}(0 real changes made)

{com}. replace facility_name = "Nelson Dewey" if facility_name == "Nelson Dewey Generating Station"
{txt}(4 real changes made)

{com}. replace facility_name = "Phil Sporn" if facility_name == "Philip Sporn"
{txt}(6 real changes made)

{com}. replace facility_name = "Potomac River" if facility_name == "Potomac Energy Center, LLC"
{txt}(2 real changes made)

{com}. replace facility_name = "Powell Avenue Steam Plant" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "R M Schahfer Generating Station" if facility_name == "R M Schahfer"
{txt}(13 real changes made)

{com}. replace facility_name = "Rawhide Energy Station" if facility_name == "Rawhide"
{txt}(13 real changes made)

{com}. replace facility_name = "River Valley Generating Station" if facility_name == "River Valley"
{txt}(5 real changes made)

{com}. replace facility_name = "River Valley Generating Station" if facility_name == "AES Shady Point LLC" 
{txt}(8 real changes made)

{com}. replace facility_name = "Riverbend" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Riverside (1081)" if facility_name == "Riverside"
{txt}(12 real changes made)

{com}. replace facility_name = "Roxboro Steam Electric Plant" if facility_name == "Roxboro"
{txt}(13 real changes made)

{com}. replace facility_name = "SHAW INDUSTRIES GROUP INC PLANT 4" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Sam Seymour" if facility_name == "Fayette Power Project"
{txt}(13 real changes made)

{com}. replace facility_name = "Scholz Electric Generating Plant" if facility_name == "Scholz"
{txt}(6 real changes made)

{com}. replace facility_name = "St. Clair" if facility_name == "St Clair"
{txt}(13 real changes made)

{com}. replace facility_name = "Tolk Station" if facility_name == "Tolk"
{txt}(13 real changes made)

{com}. replace facility_name = "Valley (WEPCO)" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "W H Weatherspoon Steam Electric Plant" if facility_name == "W H Weatherspoon"
{txt}(13 real changes made)

{com}. replace facility_name = "W H Zimmer Generating Station" if facility_name == "W H Zimmer"
{txt}(13 real changes made)

{com}. replace facility_name = "WESTAR ENERGY, INC." if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "WYOMING LIME PRODUCERS" if facility_name == "XXXXXX"
{txt}(0 real changes made)

{com}. replace facility_name = "Wabash River Gen Station" if facility_name == "Wabash River"
{txt}(7 real changes made)

{com}. replace facility_name = "Walter C Beckjord Generating Station" if facility_name == "Walter C Beckjord"
{txt}(13 real changes made)

{com}. replace facility_name = "Yorktown Power Station" if facility_name == "Yorktown"
{txt}(13 real changes made)

{com}. 
. 
. save "../Intermediate/EIA_923_forms", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/EIA_923_forms.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/EIA_923_forms.dta{rm}
saved
{p_end}

{com}. 
. 
. ********************************************************************************
. * EPA Emission Data
. ********************************************************************************
. import excel "../Raw/EPA/Emissions_US_2020.xls", sheet("Total Reported Emissions by Sta") firstrow clear
{res}{text}(24 vars, 985 obs)

{com}. 
. destring LATITUDE,replace
{txt}LATITUDE: all characters numeric; {res}replaced {txt}as {res}double
{txt}
{com}. destring LONGITUDE,replace
{txt}LONGITUDE: all characters numeric; {res}replaced {txt}as {res}double
{txt}
{com}. 
. foreach v of varlist TOTALREPORTEDEMISSIONS2011-TOTALREPORTEDEMISSIONS2020 {c -(}
{txt}  2{com}.     replace `v' ="" if `v'== "---"
{txt}  3{com}.         replace `v' = subinstr(`v', ",", "",.)
{txt}  4{com}.         destring `v', replace
{txt}  5{com}.   {c )-} 
{txt}(83 real changes made)
(890 real changes made)
TOTALREPORTEDEMISSIONS2011: all characters numeric; {res}replaced {txt}as {res}long
{txt}(83 missing values generated)
{res}{txt}(112 real changes made)
(856 real changes made)
TOTALREPORTEDEMISSIONS2012: all characters numeric; {res}replaced {txt}as {res}long
{txt}(112 missing values generated)
{res}{txt}(176 real changes made)
(798 real changes made)
TOTALREPORTEDEMISSIONS2013: all characters numeric; {res}replaced {txt}as {res}long
{txt}(176 missing values generated)
{res}{txt}(210 real changes made)
(769 real changes made)
TOTALREPORTEDEMISSIONS2014: all characters numeric; {res}replaced {txt}as {res}long
{txt}(210 missing values generated)
{res}{txt}(247 real changes made)
(725 real changes made)
TOTALREPORTEDEMISSIONS2015: all characters numeric; {res}replaced {txt}as {res}long
{txt}(247 missing values generated)
{res}{txt}(334 real changes made)
(639 real changes made)
TOTALREPORTEDEMISSIONS2016: all characters numeric; {res}replaced {txt}as {res}long
{txt}(334 missing values generated)
{res}{txt}(394 real changes made)
(577 real changes made)
TOTALREPORTEDEMISSIONS2017: all characters numeric; {res}replaced {txt}as {res}long
{txt}(394 missing values generated)
{res}{txt}(418 real changes made)
(553 real changes made)
TOTALREPORTEDEMISSIONS2018: all characters numeric; {res}replaced {txt}as {res}long
{txt}(418 missing values generated)
{res}{txt}(457 real changes made)
(513 real changes made)
TOTALREPORTEDEMISSIONS2019: all characters numeric; {res}replaced {txt}as {res}long
{txt}(457 missing values generated)
{res}{txt}(495 real changes made)
(478 real changes made)
TOTALREPORTEDEMISSIONS2020: all characters numeric; {res}replaced {txt}as {res}long
{txt}(495 missing values generated)
{res}{txt}
{com}.   
. * consolidate duplicates  
. duplicates tag GHGRPID, gen(dup)

{p 0 4}{txt}Duplicates in terms of {res} GHGRPID{p_end}
{txt}
{com}. sort dup GHGRPID
{txt}
{com}. collapse (mean) TOTALREPORTEDEMISSIONS2011-TOTALREPORTEDEMISSIONS2020 (first) FACILITY REPORTEDADDRESS-PARENTCOMPANIES, by(GHGRPID) 
{res}{txt}
{com}. 
. * clean name
. replace PARENTCOMPANIES = substr(PARENTCOMPANIES, 1, strpos(PARENTCOMPANIES, "(") - 1)
{txt}(914 real changes made)

{com}. replace PARENTCOMPANIES = strtrim(PARENTCOMPANIES)
{txt}(914 real changes made)

{com}. replace PARENTCOMPANIES = strupper(PARENTCOMPANIES)
{txt}(87 real changes made)

{com}. ren PARENTCOMPANIES plant_company
{res}{txt}
{com}. 
. * reshape to plant-year panel
. reshape long TOTALREPORTEDEMISSIONS, i(GHGRPID) j(year)
{txt}(j = 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}         939   {txt}->   {res}9,390       
{txt}Number of variables        {res}          20   {txt}->   {res}12          
{txt}j variable (10 values)                    ->   {res}year
{txt}xij variables:
{res}TOTALREPORTEDEMISSIONS2011 TOTALREPORTEDEMISSIONS2012 ... TOTALREPORTEDEMISSIONS2020{txt}->{res}TOTALREPORTEDEMISSIONS
{txt}{hline 77}

{com}. 
. *adjust a few company names for merge
. replace plant_company="PORTLAND GENERAL ELECTRIC COMPANY" if plant_company=="PORTLAND GENERAL ELECTRIC CO"
{txt}(10 real changes made)

{com}. replace plant_company="TRI-STATE GENERATION AND TRANSMISSION ASSOCIATION INC" if plant_company=="TRI-STATE GENERATION & TRANSMISSION ASSOC INC"
{txt}(20 real changes made)

{com}. replace plant_company="HOOSIER ENERGY RURAL ELECTRIC COOPERATIVE INC" if plant_company=="HOOSIER ENERGY REC INC"
{txt}(20 real changes made)

{com}. replace plant_company="OTTER TAIL CORPORATION" if plant_company=="OTTER TAIL CORP"
{txt}(30 real changes made)

{com}. replace plant_company="TALEN ENERGY CORPORATION" if plant_company=="TALEN ENERGY CORP"
{txt}(50 real changes made)

{com}. replace plant_company="LONGVIEW POWER LLC" if plant_company=="LONGVIEW INTERMEDIATE HOLDINGS C LLC"
{txt}(10 real changes made)

{com}. replace plant_company="AMERICAN ELECTRIC POWER COMPANY INC" if plant_company=="AMERICAN ELECTRIC POWER"
{txt}(70 real changes made)

{com}. replace plant_company="SOUTHERN ILLINOIS POWER CORP" if plant_company=="SOUTHERN ILLINOIS POWER COOPERATIVE"
{txt}(10 real changes made)

{com}. replace plant_company="AES CORPORATION (THE)" if plant_company=="THE AES CORP"
{txt}(10 real changes made)

{com}. replace plant_company="DUKE ENERGY CORPORATION" if plant_company=="DUKE ENERGY CORP"
{txt}(230 real changes made)

{com}. replace plant_company="BLACK HILLS CORPORATION" if plant_company=="BLACK HILLS CORP"
{txt}(70 real changes made)

{com}. replace plant_company="BLACK HILLS CORPORATION" if plant_company=="BLACK HILLS CORP"
{txt}(0 real changes made)

{com}. replace plant_company="TRANSALTA CORPORATION" if plant_company=="TRANSALTA USA INC"
{txt}(10 real changes made)

{com}. replace plant_company="SALT RIVER PROJECT" if plant_company=="SALT RIVER PROJECT AGRICULTURAL IMPROVEMENT & POWER DISTRICT"
{txt}(10 real changes made)

{com}. replace plant_company="ALLIANCE RESOURCE PARTNERS LP" if plant_company=="ALLIANCE HOLDINGS GP LP"
{txt}(10 real changes made)

{com}. replace plant_company="ALPHA METALLURGICAL RESOURCES INC" if plant_company=="ALPHA METALLURGICAL RESOURCES, LLC"
{txt}(10 real changes made)

{com}. replace plant_company="PACIFICORP" if plant_company=="BERKSHIRE HATHAWAY INC"
{txt}(170 real changes made)

{com}. replace plant_company="FORESIGHT ENERGY LP" if plant_company=="MURRAY ENERGY HOLDINGS CO"
{txt}(10 real changes made)

{com}. replace plant_company="NAVAJO TRANSITIONAL ENERGY CO LLC" if plant_company=="THE NAVAJO NATION TRIBAL GOVERNMENT"
{txt}(10 real changes made)

{com}. replace plant_company="NAVAJO TRANSITIONAL ENERGY CO LLC" if plant_company=="CONSOL ENERGY INC"
{txt}(10 real changes made)

{com}. 
. ren (TOTALREPORTEDEMISSIONS FACILITY) (co2_emission facility_name)
{res}{txt}
{com}. keep co2_emission facility_name plant_company year
{txt}
{com}. 
. tempfile plant_emission_US
{txt}
{com}. save `plant_emission_US'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001i{rm}
saved
as .dta format
{p_end}

{com}. 
. ********************************************************************
. **********************************************************************
. ** Euro plants
. ********************************************************************
. ********************************************************************
. 
. **********************************************************************
. **  ENTSO-E via Energy Chart (Average Weekly Data)
. **********************************************************************
. drop _all
{txt}
{com}. tempfile yearly_cumulator
{txt}
{com}. quietly save `yearly_cumulator', emptyok
{txt}
{com}. 
. 
. foreach country in "Germany" "Poland" "France" "Austria" "Czech_Republic" "Finland" "Greece" "Hungary" "Italy" {c -(}
{txt}  2{com}.         
.         
.         
. foreach coal_type in "Brown Coal" "Hard Coal" {c -(}
{txt}  3{com}.         if "`coal_type'" == "Brown Coal" & ("`country'" == "France" | "`country'" == "Austria" | "`country'" == "Finland" | "`country'" == "Italy") {c -(}
{txt}  4{com}.                 continue
{txt}  5{com}.         {c )-}
{txt}  6{com}.         if "`coal_type'" == "Hard Coal" & ("`country'" == "Greece" | "`country'" == "Hungary") {c -(}
{txt}  7{com}.                 continue
{txt}  8{com}.         {c )-}
{txt}  9{com}. forval year= 2015(1)2022 {c -(}
{txt} 10{com}.         
.                 if "`coal_type'" == "Brown Coal" {c -(}
{txt} 11{com}.                         import excel "../Raw/Energy_Chart/`country'/`coal_type'/energy-charts_Average_net_electricity_generation_from_fossil_brown_coal___lignite_during_one_week_in_`country'_`year'.xlsx", clear firstrow
{txt} 12{com}.                 {c )-}
{txt} 13{com}.                 else if "`coal_type'" == "Hard Coal" {c -(}
{txt} 14{com}.                         import excel "../Raw/Energy_Chart/`country'/`coal_type'/energy-charts_Average_net_electricity_generation_from_fossil_hard_coal_during_one_week_in_`country'_`year'.xlsx", clear firstrow
{txt} 15{com}.                 {c )-}
{txt} 16{com}.         drop if _n == 1
{txt} 17{com}. 
.         *Reshaping Data
.         ds Date, not
{txt} 18{com}.         destring `r(varlist)', replace
{txt} 19{com}.         ds Date, not
{txt} 20{com}.         collapse (mean) `r(varlist)'
{txt} 21{com}.         ds
{txt} 22{com}.         rename (`r(varlist)') hourly_ave=
{txt} 23{com}.         gen year = `year'
{txt} 24{com}.         reshape long hourly_ave, i(year) j(facility_name) string
{txt} 25{com}. 
.         *Collapsing on a plant level
.         quietly forvalues i = 1/`=_N' {c -(}
{txt} 26{com}.                 forvalues j = 1/3 {c -(} //Repeating a couple times to make sure, plant level
{txt} 27{com}.                         local lastchar = substr(facility_name[`i'], strlen(facility_name[`i']), 1)
{txt} 28{com}.                         if regexm("`lastchar'", "^[A-Z]$") {c -(}
{txt} 29{com}.                                 replace facility_name = substr(facility_name[`i'], 1, strlen(facility_name[`i']) - 1) in `i'
{txt} 30{com}.                                 {c )-}
{txt} 31{com}.                         if regexm("`lastchar'", "^[0-9]$") {c -(}
{txt} 32{com}.                         replace facility_name = substr(facility_name[`i'], 1, strlen(facility_name[`i']) - 1) in `i'
{txt} 33{com}.                         {c )-}
{txt} 34{com}.                 {c )-}
{txt} 35{com}.         {c )-}
{txt} 36{com}.         collapse (sum) hourly_ave, by (facility_name year)
{txt} 37{com}. 
.         *Converting to Yearly MWh
.         gen country = "`country'"
{txt} 38{com}.         gen yearly_mhw = (8760*hourly_ave)
{txt} 39{com}. 
.         append using `yearly_cumulator', force
{txt} 40{com}.         quietly save `yearly_cumulator', replace
{txt} 41{com}.         {c )-}
{txt} 42{com}.         {c )-}
{txt} 43{com}. {c )-}
{res}{text}(41 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}Frimmersdo~Q{col 31}JänschwaldeF{col 46}NeurathD{col 61}NiederaußemF{col 76}SchwarzePu~B
{col 1}BoxbergP{col 16}Goldenberg{col 31}Klingenberg{col 46}NeurathE{col 61}NiederaußemG{col 76}WeisweilerE
{col 1}BoxbergQ{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}Buschhaus{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}FrechenWac~g{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}Frimmersdo~P{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}Buschhaus: all characters numeric; {res}replaced {txt}as {res}double
{txt}FrechenWachtberg: all characters numeric; {res}replaced {txt}as {res}double
{txt}FrimmersdorfP: all characters numeric; {res}replaced {txt}as {res}double
{txt}FrimmersdorfQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}Goldenberg: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeE: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeF: all characters numeric; {res}replaced {txt}as {res}double
{txt}Klingenberg: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathB: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}Frimmersdo~Q{col 31}JänschwaldeF{col 46}NeurathD{col 61}NiederaußemF{col 76}SchwarzePu~B
{col 1}BoxbergP{col 16}Goldenberg{col 31}Klingenberg{col 46}NeurathE{col 61}NiederaußemG{col 76}WeisweilerE
{col 1}BoxbergQ{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}Buschhaus{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}FrechenWac~g{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}Frimmersdo~P{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{res}{txt}{col 1}BoxbergN{col 16}Frimmersdo~Q{col 31}JänschwaldeF{col 46}NeurathD{col 61}NiederaußemF{col 76}SchwarzePu~B
{col 1}BoxbergP{col 16}Goldenberg{col 31}Klingenberg{col 46}NeurathE{col 61}NiederaußemG{col 76}WeisweilerE
{col 1}BoxbergQ{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}Buschhaus{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}FrechenWac~g{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}Frimmersdo~P{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR Buschhaus FrechenWachtberg FrimmersdorfP FrimmersdorfQ Goldenberg JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD JänschwaldeE JänschwaldeF Klingenberg LippendorfR LippendorfS NeurathA NeurathB NeurathC NeurathD NeurathE NeurathF NeurathG NiederaußemC NiederaußemD NiederaußemE NiederaußemF NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerE WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}40          
{txt}Number of variables        {res}          41   {txt}->   {res}3           
{txt}j variable (40 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(40 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}Frimmersdo~Q{col 31}Klingenberg{col 46}NeurathE{col 61}NiederaußemG{col 76}WeisweilerE
{col 1}BoxbergP{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergQ{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}BoxbergR{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}Buschhaus{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}FrechenWac~g{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{col 1}Frimmersdo~P{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchwarzePu~B
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}Buschhaus: all characters numeric; {res}replaced {txt}as {res}double
{txt}FrechenWachtberg: all characters numeric; {res}replaced {txt}as {res}double
{txt}FrimmersdorfP: all characters numeric; {res}replaced {txt}as {res}double
{txt}FrimmersdorfQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeE: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeF: all characters numeric; {res}replaced {txt}as {res}double
{txt}Klingenberg: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathB: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}Frimmersdo~Q{col 31}Klingenberg{col 46}NeurathE{col 61}NiederaußemG{col 76}WeisweilerE
{col 1}BoxbergP{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergQ{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}BoxbergR{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}Buschhaus{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}FrechenWac~g{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{col 1}Frimmersdo~P{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchwarzePu~B
{res}{txt}{col 1}BoxbergN{col 16}Frimmersdo~Q{col 31}Klingenberg{col 46}NeurathE{col 61}NiederaußemG{col 76}WeisweilerE
{col 1}BoxbergP{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergQ{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}BoxbergR{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}Buschhaus{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}FrechenWac~g{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{col 1}Frimmersdo~P{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchwarzePu~B
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR Buschhaus FrechenWachtberg FrimmersdorfP FrimmersdorfQ JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD JänschwaldeE JänschwaldeF Klingenberg LippendorfR LippendorfS NeurathA NeurathB NeurathC NeurathD NeurathE NeurathF NeurathG NiederaußemC NiederaußemD NiederaußemE NiederaußemF NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerE WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}39          
{txt}Number of variables        {res}          40   {txt}->   {res}3           
{txt}j variable (39 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(39 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergP{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}BoxbergQ{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}BoxbergR{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}Buschhaus{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{col 1}Frimmersdo~P{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchwarzePu~B
{col 1}Frimmersdo~Q{col 16}Klingenberg{col 31}NeurathE{col 46}NiederaußemG{col 61}WeisweilerE
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}Buschhaus: all characters numeric; {res}replaced {txt}as {res}byte
{txt}FrimmersdorfP: all characters numeric; {res}replaced {txt}as {res}double
{txt}FrimmersdorfQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeE: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeF: all characters numeric; {res}replaced {txt}as {res}double
{txt}Klingenberg: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathB: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergP{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}BoxbergQ{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}BoxbergR{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}Buschhaus{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{col 1}Frimmersdo~P{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchwarzePu~B
{col 1}Frimmersdo~Q{col 16}Klingenberg{col 31}NeurathE{col 46}NiederaußemG{col 61}WeisweilerE
{res}{txt}{col 1}BoxbergN{col 16}JänschwaldeA{col 31}LippendorfR{col 46}NeurathF{col 61}NiederaußemH{col 76}WeisweilerF
{col 1}BoxbergP{col 16}JänschwaldeB{col 31}LippendorfS{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerG
{col 1}BoxbergQ{col 16}JänschwaldeC{col 31}NeurathA{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerH
{col 1}BoxbergR{col 16}JänschwaldeD{col 31}NeurathB{col 46}NiederaußemD{col 61}SchkopauB
{col 1}Buschhaus{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchwarzePu~A
{col 1}Frimmersdo~P{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchwarzePu~B
{col 1}Frimmersdo~Q{col 16}Klingenberg{col 31}NeurathE{col 46}NiederaußemG{col 61}WeisweilerE
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR Buschhaus FrimmersdorfP FrimmersdorfQ JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD JänschwaldeE JänschwaldeF Klingenberg LippendorfR LippendorfS NeurathA NeurathB NeurathC NeurathD NeurathE NeurathF NeurathG NiederaußemC NiederaußemD NiederaußemE NiederaußemF NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerE WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}38          
{txt}Number of variables        {res}          39   {txt}->   {res}3           
{txt}j variable (38 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str16} to accommodate using data's values)
{p_end}
{res}{text}(37 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}JänschwaldeB{col 31}LippendorfR{col 46}NeurathE{col 61}NiederaußemF{col 76}SchwarzePu~A
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemG{col 76}SchwarzePu~B
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemH{col 76}WeisweilerE
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathB{col 46}NiederaußemC{col 61}NiederaußemK{col 76}WeisweilerF
{col 1}Buschhaus{col 16}JänschwaldeF{col 31}NeurathC{col 46}NiederaußemD{col 61}SchkopauA{col 76}WeisweilerG
{col 1}JänschwaldeA{col 16}Klingenberg{col 31}NeurathD{col 46}NiederaußemE{col 61}SchkopauB{col 76}WeisweilerH
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}Buschhaus: all characters numeric; {res}replaced {txt}as {res}byte
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeE: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeF: all characters numeric; {res}replaced {txt}as {res}double
{txt}Klingenberg: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathB: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}LippendorfR{col 46}NeurathE{col 61}NiederaußemF{col 76}SchwarzePu~A
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemG{col 76}SchwarzePu~B
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemH{col 76}WeisweilerE
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathB{col 46}NiederaußemC{col 61}NiederaußemK{col 76}WeisweilerF
{col 1}Buschhaus{col 16}JänschwaldeF{col 31}NeurathC{col 46}NiederaußemD{col 61}SchkopauA{col 76}WeisweilerG
{col 1}JänschwaldeA{col 16}Klingenberg{col 31}NeurathD{col 46}NiederaußemE{col 61}SchkopauB{col 76}WeisweilerH
{res}{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}LippendorfR{col 46}NeurathE{col 61}NiederaußemF{col 76}SchwarzePu~A
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemG{col 76}SchwarzePu~B
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemH{col 76}WeisweilerE
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathB{col 46}NiederaußemC{col 61}NiederaußemK{col 76}WeisweilerF
{col 1}Buschhaus{col 16}JänschwaldeF{col 31}NeurathC{col 46}NiederaußemD{col 61}SchkopauA{col 76}WeisweilerG
{col 1}JänschwaldeA{col 16}Klingenberg{col 31}NeurathD{col 46}NiederaußemE{col 61}SchkopauB{col 76}WeisweilerH
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR Buschhaus JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD JänschwaldeE JänschwaldeF Klingenberg LippendorfR LippendorfS NeurathA NeurathB NeurathC NeurathD NeurathE NeurathF NeurathG NiederaußemC NiederaußemD NiederaußemE NiederaußemF NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerE WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}36          
{txt}Number of variables        {res}          37   {txt}->   {res}3           
{txt}j variable (36 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str16} to accommodate using data's values)
{p_end}
{res}{text}(33 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}SchkopauA{col 76}WeisweilerG
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauB{col 76}WeisweilerH
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathC{col 46}NiederaußemD{col 61}SchwarzePu~A
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathD{col 46}NiederaußemG{col 61}SchwarzePu~B
{col 1}Buschhaus{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemH{col 61}WeisweilerE
{col 1}JänschwaldeA{col 16}LippendorfS{col 31}NeurathF{col 46}NiederaußemK{col 61}WeisweilerF
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}Buschhaus: all characters numeric; {res}replaced {txt}as {res}byte
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeE: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathB: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}SchkopauA{col 76}WeisweilerG
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauB{col 76}WeisweilerH
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathC{col 46}NiederaußemD{col 61}SchwarzePu~A
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathD{col 46}NiederaußemG{col 61}SchwarzePu~B
{col 1}Buschhaus{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemH{col 61}WeisweilerE
{col 1}JänschwaldeA{col 16}LippendorfS{col 31}NeurathF{col 46}NiederaußemK{col 61}WeisweilerF
{res}{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}SchkopauA{col 76}WeisweilerG
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauB{col 76}WeisweilerH
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathC{col 46}NiederaußemD{col 61}SchwarzePu~A
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathD{col 46}NiederaußemG{col 61}SchwarzePu~B
{col 1}Buschhaus{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemH{col 61}WeisweilerE
{col 1}JänschwaldeA{col 16}LippendorfS{col 31}NeurathF{col 46}NiederaußemK{col 61}WeisweilerF
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR Buschhaus JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD JänschwaldeE LippendorfR LippendorfS NeurathA NeurathB NeurathC NeurathD NeurathE NeurathF NeurathG NiederaußemC NiederaußemD NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerE WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}32          
{txt}Number of variables        {res}          33   {txt}->   {res}3           
{txt}j variable (32 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str16} to accommodate using data's values)
{p_end}
{res}{text}(31 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}JänschwaldeA{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemH{col 76}SchwarzePu~B
{col 1}BoxbergP{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerE
{col 1}BoxbergQ{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeD{col 31}NeurathD{col 46}NiederaußemD{col 61}SchkopauB{col 76}WeisweilerG
{col 1}Buschhaus{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemG{col 61}SchwarzePu~A{col 76}WeisweilerH
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}Buschhaus: all characters numeric; {res}replaced {txt}as {res}byte
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathB: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}JänschwaldeA{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemH{col 76}SchwarzePu~B
{col 1}BoxbergP{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerE
{col 1}BoxbergQ{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeD{col 31}NeurathD{col 46}NiederaußemD{col 61}SchkopauB{col 76}WeisweilerG
{col 1}Buschhaus{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemG{col 61}SchwarzePu~A{col 76}WeisweilerH
{res}{txt}{col 1}BoxbergN{col 16}JänschwaldeA{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemH{col 76}SchwarzePu~B
{col 1}BoxbergP{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerE
{col 1}BoxbergQ{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauA{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeD{col 31}NeurathD{col 46}NiederaußemD{col 61}SchkopauB{col 76}WeisweilerG
{col 1}Buschhaus{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemG{col 61}SchwarzePu~A{col 76}WeisweilerH
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR Buschhaus JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD LippendorfR LippendorfS NeurathA NeurathB NeurathD NeurathE NeurathF NeurathG NiederaußemC NiederaußemD NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerE WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}30          
{txt}Number of variables        {res}          31   {txt}->   {res}3           
{txt}j variable (30 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str16} to accommodate using data's values)
{p_end}
{res}{text}(29 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}SchkopauA{col 76}WeisweilerF
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauB{col 76}WeisweilerG
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathD{col 46}NiederaußemG{col 61}SchwarzePu~A{col 76}WeisweilerH
{col 1}BoxbergR{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemH{col 61}SchwarzePu~B
{col 1}JänschwaldeA{col 16}LippendorfS{col 31}NeurathF{col 46}NiederaußemK{col 61}WeisweilerE
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathB: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}SchkopauA{col 76}WeisweilerF
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauB{col 76}WeisweilerG
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathD{col 46}NiederaußemG{col 61}SchwarzePu~A{col 76}WeisweilerH
{col 1}BoxbergR{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemH{col 61}SchwarzePu~B
{col 1}JänschwaldeA{col 16}LippendorfS{col 31}NeurathF{col 46}NiederaußemK{col 61}WeisweilerE
{res}{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}NeurathA{col 46}NeurathG{col 61}SchkopauA{col 76}WeisweilerF
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}NeurathB{col 46}NiederaußemC{col 61}SchkopauB{col 76}WeisweilerG
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathD{col 46}NiederaußemG{col 61}SchwarzePu~A{col 76}WeisweilerH
{col 1}BoxbergR{col 16}LippendorfR{col 31}NeurathE{col 46}NiederaußemH{col 61}SchwarzePu~B
{col 1}JänschwaldeA{col 16}LippendorfS{col 31}NeurathF{col 46}NiederaußemK{col 61}WeisweilerE
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD LippendorfR LippendorfS NeurathA NeurathB NeurathD NeurathE NeurathF NeurathG NiederaußemC NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerE WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}28          
{txt}Number of variables        {res}          29   {txt}->   {res}3           
{txt}j variable (28 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str16} to accommodate using data's values)
{p_end}
{res}{text}(31 vars, 169 obs)
(1 observation deleted)
{col 1}BoxbergN{col 16}JänschwaldeB{col 31}LippendorfR{col 46}NeurathE{col 61}NiederaußemG{col 76}SchwarzePu~A
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemH{col 76}SchwarzePu~B
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchkopauA{col 76}WeisweilerG
{col 1}JänschwaldeA{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchkopauB{col 76}WeisweilerH
BoxbergN: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergP: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergQ: all characters numeric; {res}replaced {txt}as {res}double
{txt}BoxbergR: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeC: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeD: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeE: all characters numeric; {res}replaced {txt}as {res}double
{txt}JänschwaldeF: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfR: all characters numeric; {res}replaced {txt}as {res}double
{txt}LippendorfS: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathA: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathC: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathD: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NeurathG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemE: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemF: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemG: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemH: all characters numeric; {res}replaced {txt}as {res}double
{txt}NiederaußemK: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchkopauB: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}SchwarzePumpeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerG: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeisweilerH: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}LippendorfR{col 46}NeurathE{col 61}NiederaußemG{col 76}SchwarzePu~A
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemH{col 76}SchwarzePu~B
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchkopauA{col 76}WeisweilerG
{col 1}JänschwaldeA{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchkopauB{col 76}WeisweilerH
{res}{txt}{col 1}BoxbergN{col 16}JänschwaldeB{col 31}LippendorfR{col 46}NeurathE{col 61}NiederaußemG{col 76}SchwarzePu~A
{col 1}BoxbergP{col 16}JänschwaldeC{col 31}LippendorfS{col 46}NeurathF{col 61}NiederaußemH{col 76}SchwarzePu~B
{col 1}BoxbergQ{col 16}JänschwaldeD{col 31}NeurathA{col 46}NeurathG{col 61}NiederaußemK{col 76}WeisweilerF
{col 1}BoxbergR{col 16}JänschwaldeE{col 31}NeurathC{col 46}NiederaußemE{col 61}SchkopauA{col 76}WeisweilerG
{col 1}JänschwaldeA{col 16}JänschwaldeF{col 31}NeurathD{col 46}NiederaußemF{col 61}SchkopauB{col 76}WeisweilerH
{res}{txt}(j = BoxbergN BoxbergP BoxbergQ BoxbergR JänschwaldeA JänschwaldeB JänschwaldeC JänschwaldeD JänschwaldeE JänschwaldeF LippendorfR LippendorfS NeurathA NeurathC NeurathD NeurathE NeurathF NeurathG NiederaußemE NiederaußemF NiederaußemG NiederaußemH NiederaußemK SchkopauA SchkopauB SchwarzePumpeA SchwarzePumpeB WeisweilerF WeisweilerG WeisweilerH)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}30          
{txt}Number of variables        {res}          31   {txt}->   {res}3           
{txt}j variable (30 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBoxbergN hourly_aveBoxbergP ... hourly_aveWeisweilerH{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str16} to accommodate using data's values)
{p_end}
{res}{text}(56 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~1{col 16}DuisburgWa~9{col 31}Heilbronn6{col 46}MannheimDB{col 61}Veltheim3{col 76}Wilhelmsha~N
{col 1}AltbachDei~2{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~F
{col 1}BergkamenA{col 16}Ensdorf3{col 31}Herne4{col 46}Mehrum3{col 61}VoerdeB{col 76}WolfsburgW~1
{col 1}BerlinReut~C{col 16}Farge{col 31}Heyden{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~2
{col 1}BerlinReut~D{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}MoorburgB{col 61}Völkling~MKV{col 76}Zolling
{col 1}BerlinReut~E{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MünchenNord2{col 61}Wedel1
{col 1}BexbachA{col 16}Hannover1{col 31}KarlsruheR~8{col 46}Rostock{col 61}Wedel2
{col 1}BremenHafen5{col 16}Hannover2{col 31}Kiel{col 46}ScholvenB{col 61}WeiherC
{col 1}BremenHafen6{col 16}Hastedt15{col 31}Lünen1{col 46}ScholvenC{col 61}WestfalenC
{col 1}DuisburgW~10{col 16}Heilbronn5{col 31}MannheimAm~n{col 46}Staudinger5{col 61}WestfalenE
AltbachDeizisau1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterC: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BremenHafen5: all characters numeric; {res}replaced {txt}as {res}byte
{txt}BremenHafen6: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}GersteinwerkK2: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}IbbenbürenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kiel: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgA: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Veltheim3: all characters numeric; {res}replaced {txt}as {res}double
{txt}VoerdeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}VoerdeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenEON: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~1{col 16}DuisburgWa~9{col 31}Heilbronn6{col 46}MannheimDB{col 61}Veltheim3{col 76}Wilhelmsha~N
{col 1}AltbachDei~2{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~F
{col 1}BergkamenA{col 16}Ensdorf3{col 31}Herne4{col 46}Mehrum3{col 61}VoerdeB{col 76}WolfsburgW~1
{col 1}BerlinReut~C{col 16}Farge{col 31}Heyden{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~2
{col 1}BerlinReut~D{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}MoorburgB{col 61}Völkling~MKV{col 76}Zolling
{col 1}BerlinReut~E{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MünchenNord2{col 61}Wedel1
{col 1}BexbachA{col 16}Hannover1{col 31}KarlsruheR~8{col 46}Rostock{col 61}Wedel2
{col 1}BremenHafen5{col 16}Hannover2{col 31}Kiel{col 46}ScholvenB{col 61}WeiherC
{col 1}BremenHafen6{col 16}Hastedt15{col 31}Lünen1{col 46}ScholvenC{col 61}WestfalenC
{col 1}DuisburgW~10{col 16}Heilbronn5{col 31}MannheimAm~n{col 46}Staudinger5{col 61}WestfalenE
{res}{txt}{col 1}AltbachDei~1{col 16}DuisburgWa~9{col 31}Heilbronn6{col 46}MannheimDB{col 61}Veltheim3{col 76}Wilhelmsha~N
{col 1}AltbachDei~2{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~F
{col 1}BergkamenA{col 16}Ensdorf3{col 31}Herne4{col 46}Mehrum3{col 61}VoerdeB{col 76}WolfsburgW~1
{col 1}BerlinReut~C{col 16}Farge{col 31}Heyden{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~2
{col 1}BerlinReut~D{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}MoorburgB{col 61}Völkling~MKV{col 76}Zolling
{col 1}BerlinReut~E{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MünchenNord2{col 61}Wedel1
{col 1}BexbachA{col 16}Hannover1{col 31}KarlsruheR~8{col 46}Rostock{col 61}Wedel2
{col 1}BremenHafen5{col 16}Hannover2{col 31}Kiel{col 46}ScholvenB{col 61}WeiherC
{col 1}BremenHafen6{col 16}Hastedt15{col 31}Lünen1{col 46}ScholvenC{col 61}WestfalenC
{col 1}DuisburgW~10{col 16}Heilbronn5{col 31}MannheimAm~n{col 46}Staudinger5{col 61}WestfalenE
{res}{txt}(j = AltbachDeizisau1 AltbachDeizisau2 BergkamenA BerlinReuterC BerlinReuterD BerlinReuterE BexbachA BremenHafen5 BremenHafen6 DuisburgWalsum10 DuisburgWalsum9 Ensdorf1 Ensdorf3 Farge GersteinwerkK2 HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn5 Heilbronn6 Heilbronn7 Herne4 Heyden IbbenbürenB KarlsruheRDK7 KarlsruheRDK8 Kiel Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MoorburgA MoorburgB MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 Veltheim3 VoerdeA VoerdeB VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WestfalenC WestfalenE WilhelmshavenEON WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}55          
{txt}Number of variables        {res}          56   {txt}->   {res}3           
{txt}j variable (55 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau1 hourly_aveAltbachDeizisau2 ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(54 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~1{col 16}DuisburgW~10{col 31}Hannover2{col 46}Lünen1{col 61}ScholvenB{col 76}WeiherC
{col 1}AltbachDei~2{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}MannheimAm~n{col 61}ScholvenC{col 76}WestfalenC
{col 1}BergkamenA{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimDB{col 61}Staudinger5{col 76}WestfalenE
{col 1}BerlinReut~C{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~N
{col 1}BerlinReut~D{col 16}Farge{col 31}Heyden{col 46}Mehrum3{col 61}VoerdeB{col 76}Wilhelmsha~F
{col 1}BerlinReut~E{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BexbachA{col 16}HERNE_3{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}BremenHafen5{col 16}HamburgTie~2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel1{col 76}Zolling
{col 1}BremenHafen6{col 16}Hannover1{col 31}Kiel{col 46}Rostock{col 61}Wedel2
AltbachDeizisau1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterC: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BremenHafen5: all characters numeric; {res}replaced {txt}as {res}byte
{txt}BremenHafen6: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}GersteinwerkK2: all characters numeric; {res}replaced {txt}as {res}double
{txt}HERNE_3: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}IbbenbürenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kiel: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgA: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}VoerdeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}VoerdeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenEON: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~1{col 16}DuisburgW~10{col 31}Hannover2{col 46}Lünen1{col 61}ScholvenB{col 76}WeiherC
{col 1}AltbachDei~2{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}MannheimAm~n{col 61}ScholvenC{col 76}WestfalenC
{col 1}BergkamenA{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimDB{col 61}Staudinger5{col 76}WestfalenE
{col 1}BerlinReut~C{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~N
{col 1}BerlinReut~D{col 16}Farge{col 31}Heyden{col 46}Mehrum3{col 61}VoerdeB{col 76}Wilhelmsha~F
{col 1}BerlinReut~E{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BexbachA{col 16}HERNE_3{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}BremenHafen5{col 16}HamburgTie~2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel1{col 76}Zolling
{col 1}BremenHafen6{col 16}Hannover1{col 31}Kiel{col 46}Rostock{col 61}Wedel2
{res}{txt}{col 1}AltbachDei~1{col 16}DuisburgW~10{col 31}Hannover2{col 46}Lünen1{col 61}ScholvenB{col 76}WeiherC
{col 1}AltbachDei~2{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}MannheimAm~n{col 61}ScholvenC{col 76}WestfalenC
{col 1}BergkamenA{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimDB{col 61}Staudinger5{col 76}WestfalenE
{col 1}BerlinReut~C{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~N
{col 1}BerlinReut~D{col 16}Farge{col 31}Heyden{col 46}Mehrum3{col 61}VoerdeB{col 76}Wilhelmsha~F
{col 1}BerlinReut~E{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BexbachA{col 16}HERNE_3{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}BremenHafen5{col 16}HamburgTie~2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel1{col 76}Zolling
{col 1}BremenHafen6{col 16}Hannover1{col 31}Kiel{col 46}Rostock{col 61}Wedel2
{res}{txt}(j = AltbachDeizisau1 AltbachDeizisau2 BergkamenA BerlinReuterC BerlinReuterD BerlinReuterE BexbachA BremenHafen5 BremenHafen6 DuisburgWalsum10 DuisburgWalsum9 Ensdorf1 Ensdorf3 Farge GersteinwerkK2 HERNE_3 HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn7 Herne4 Heyden IbbenbürenB KarlsruheRDK7 KarlsruheRDK8 Kiel Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MoorburgA MoorburgB MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 VoerdeA VoerdeB VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WestfalenC WestfalenE WilhelmshavenEON WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}53          
{txt}Number of variables        {res}          54   {txt}->   {res}3           
{txt}j variable (53 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau1 hourly_aveAltbachDeizisau2 ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(52 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~1{col 16}DuisburgW~10{col 31}Hastedt15{col 46}MannheimAm~n{col 61}ScholvenC{col 76}WestfalenE
{col 1}AltbachDei~2{col 16}DuisburgWa~9{col 31}Heilbronn7{col 46}MannheimDB{col 61}Staudinger5{col 76}Wilhelmsha~N
{col 1}BergkamenA{col 16}Ensdorf1{col 31}Herne4{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~F
{col 1}BerlinReut~C{col 16}Ensdorf3{col 31}Heyden{col 46}Mehrum3{col 61}VoerdeB{col 76}WolfsburgW~1
{col 1}BerlinReut~D{col 16}Farge{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~2
{col 1}BerlinReut~E{col 16}Gersteinwe~2{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Völkling~MKV{col 76}Zolling
{col 1}BexbachA{col 16}HamburgTie~2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel1
{col 1}BremenHafen6{col 16}Hannover1{col 31}Kiel{col 46}Rostock{col 61}Wedel2
{col 1}Datteln4{col 16}Hannover2{col 31}Lünen1{col 46}ScholvenB{col 61}WeiherC
AltbachDeizisau1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterC: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BremenHafen6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Datteln4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}GersteinwerkK2: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}IbbenbürenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kiel: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgA: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}VoerdeA: all characters numeric; {res}replaced {txt}as {res}double
{txt}VoerdeB: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenEON: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~1{col 16}DuisburgW~10{col 31}Hastedt15{col 46}MannheimAm~n{col 61}ScholvenC{col 76}WestfalenE
{col 1}AltbachDei~2{col 16}DuisburgWa~9{col 31}Heilbronn7{col 46}MannheimDB{col 61}Staudinger5{col 76}Wilhelmsha~N
{col 1}BergkamenA{col 16}Ensdorf1{col 31}Herne4{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~F
{col 1}BerlinReut~C{col 16}Ensdorf3{col 31}Heyden{col 46}Mehrum3{col 61}VoerdeB{col 76}WolfsburgW~1
{col 1}BerlinReut~D{col 16}Farge{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~2
{col 1}BerlinReut~E{col 16}Gersteinwe~2{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Völkling~MKV{col 76}Zolling
{col 1}BexbachA{col 16}HamburgTie~2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel1
{col 1}BremenHafen6{col 16}Hannover1{col 31}Kiel{col 46}Rostock{col 61}Wedel2
{col 1}Datteln4{col 16}Hannover2{col 31}Lünen1{col 46}ScholvenB{col 61}WeiherC
{res}{txt}{col 1}AltbachDei~1{col 16}DuisburgW~10{col 31}Hastedt15{col 46}MannheimAm~n{col 61}ScholvenC{col 76}WestfalenE
{col 1}AltbachDei~2{col 16}DuisburgWa~9{col 31}Heilbronn7{col 46}MannheimDB{col 61}Staudinger5{col 76}Wilhelmsha~N
{col 1}BergkamenA{col 16}Ensdorf1{col 31}Herne4{col 46}MannheimTNG{col 61}VoerdeA{col 76}Wilhelmsha~F
{col 1}BerlinReut~C{col 16}Ensdorf3{col 31}Heyden{col 46}Mehrum3{col 61}VoerdeB{col 76}WolfsburgW~1
{col 1}BerlinReut~D{col 16}Farge{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~HKV{col 76}WolfsburgW~2
{col 1}BerlinReut~E{col 16}Gersteinwe~2{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Völkling~MKV{col 76}Zolling
{col 1}BexbachA{col 16}HamburgTie~2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel1
{col 1}BremenHafen6{col 16}Hannover1{col 31}Kiel{col 46}Rostock{col 61}Wedel2
{col 1}Datteln4{col 16}Hannover2{col 31}Lünen1{col 46}ScholvenB{col 61}WeiherC
{res}{txt}(j = AltbachDeizisau1 AltbachDeizisau2 BergkamenA BerlinReuterC BerlinReuterD BerlinReuterE BexbachA BremenHafen6 Datteln4 DuisburgWalsum10 DuisburgWalsum9 Ensdorf1 Ensdorf3 Farge GersteinwerkK2 HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn7 Herne4 Heyden IbbenbürenB KarlsruheRDK7 KarlsruheRDK8 Kiel Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MoorburgA MoorburgB MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 VoerdeA VoerdeB VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WestfalenE WilhelmshavenEON WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}51          
{txt}Number of variables        {res}          52   {txt}->   {res}3           
{txt}j variable (51 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau1 hourly_aveAltbachDeizisau2 ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(49 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Hannover2{col 46}Kiel{col 61}MünchenNord2{col 76}Wedel2
{col 1}BergkamenA{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}Lünen1{col 61}Rostock{col 76}WeiherC
{col 1}BerlinReut~C{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterC: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BremenHafen6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Datteln4: all characters numeric; {res}replaced {txt}as {res}byte
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Ensdorf3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}GersteinwerkK2: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}IbbenbürenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kiel: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgA: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenEON: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Hannover2{col 46}Kiel{col 61}MünchenNord2{col 76}Wedel2
{col 1}BergkamenA{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}Lünen1{col 61}Rostock{col 76}WeiherC
{col 1}BerlinReut~C{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
{res}{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Hannover2{col 46}Kiel{col 61}MünchenNord2{col 76}Wedel2
{col 1}BergkamenA{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}Lünen1{col 61}Rostock{col 76}WeiherC
{col 1}BerlinReut~C{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
{res}{txt}(j = AltbachDeizisau2 BergkamenA BerlinReuterC BerlinReuterD BerlinReuterE BexbachA BremenHafen6 Datteln4 DuisburgWalsum10 DuisburgWalsum9 Ensdorf1 Ensdorf3 Farge GersteinwerkK2 HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn7 Herne4 Heyden IbbenbürenB KarlsruheRDK7 KarlsruheRDK8 Kiel Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MoorburgA MoorburgB MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WestfalenE WilhelmshavenEON WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}48          
{txt}Number of variables        {res}          49   {txt}->   {res}3           
{txt}j variable (48 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau2 hourly_aveBergkamenA ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(49 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Hannover2{col 46}Kiel{col 61}MünchenNord2{col 76}Wedel2
{col 1}BergkamenA{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}Lünen1{col 61}Rostock{col 76}WeiherC
{col 1}BerlinReut~C{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterC: all characters numeric; {res}replaced {txt}as {res}byte
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BremenHafen6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Datteln4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Ensdorf3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}GersteinwerkK2: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}IbbenbürenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kiel: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgA: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenEON: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Hannover2{col 46}Kiel{col 61}MünchenNord2{col 76}Wedel2
{col 1}BergkamenA{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}Lünen1{col 61}Rostock{col 76}WeiherC
{col 1}BerlinReut~C{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
{res}{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Hannover2{col 46}Kiel{col 61}MünchenNord2{col 76}Wedel2
{col 1}BergkamenA{col 16}DuisburgWa~9{col 31}Hastedt15{col 46}Lünen1{col 61}Rostock{col 76}WeiherC
{col 1}BerlinReut~C{col 16}Ensdorf1{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}Ensdorf3{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Gersteinwe~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
{res}{txt}(j = AltbachDeizisau2 BergkamenA BerlinReuterC BerlinReuterD BerlinReuterE BexbachA BremenHafen6 Datteln4 DuisburgWalsum10 DuisburgWalsum9 Ensdorf1 Ensdorf3 Farge GersteinwerkK2 HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn7 Herne4 Heyden IbbenbürenB KarlsruheRDK7 KarlsruheRDK8 Kiel Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MoorburgA MoorburgB MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WestfalenE WilhelmshavenEON WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}48          
{txt}Number of variables        {res}          49   {txt}->   {res}3           
{txt}j variable (48 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau2 hourly_aveBergkamenA ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(45 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~2{col 16}Ensdorf1{col 31}Herne4{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BergkamenA{col 16}Ensdorf3{col 31}Heyden{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BerlinReut~D{col 16}Farge{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}BerlinReut~E{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
{col 1}BexbachA{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel2
{col 1}BremenHafen6{col 16}Hannover2{col 31}Lünen1{col 46}Rostock{col 61}WeiherC
{col 1}Datteln4{col 16}Hastedt15{col 31}MannheimAm~n{col 46}ScholvenB{col 61}WestfalenE
{col 1}DuisburgW~10{col 16}Heilbronn7{col 31}MannheimDB{col 46}ScholvenC{col 61}Wilhelmsha~N
AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BremenHafen6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Datteln4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ensdorf1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Ensdorf3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}IbbenbürenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgA: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenEON: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~2{col 16}Ensdorf1{col 31}Herne4{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BergkamenA{col 16}Ensdorf3{col 31}Heyden{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BerlinReut~D{col 16}Farge{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}BerlinReut~E{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
{col 1}BexbachA{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel2
{col 1}BremenHafen6{col 16}Hannover2{col 31}Lünen1{col 46}Rostock{col 61}WeiherC
{col 1}Datteln4{col 16}Hastedt15{col 31}MannheimAm~n{col 46}ScholvenB{col 61}WestfalenE
{col 1}DuisburgW~10{col 16}Heilbronn7{col 31}MannheimDB{col 46}ScholvenC{col 61}Wilhelmsha~N
{res}{txt}{col 1}AltbachDei~2{col 16}Ensdorf1{col 31}Herne4{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BergkamenA{col 16}Ensdorf3{col 31}Heyden{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BerlinReut~D{col 16}Farge{col 31}IbbenbürenB{col 46}MoorburgA{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}BerlinReut~E{col 16}HamburgTie~2{col 31}KarlsruheR~7{col 46}MoorburgB{col 61}Wedel1{col 76}Zolling
{col 1}BexbachA{col 16}Hannover1{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Wedel2
{col 1}BremenHafen6{col 16}Hannover2{col 31}Lünen1{col 46}Rostock{col 61}WeiherC
{col 1}Datteln4{col 16}Hastedt15{col 31}MannheimAm~n{col 46}ScholvenB{col 61}WestfalenE
{col 1}DuisburgW~10{col 16}Heilbronn7{col 31}MannheimDB{col 46}ScholvenC{col 61}Wilhelmsha~N
{res}{txt}(j = AltbachDeizisau2 BergkamenA BerlinReuterD BerlinReuterE BexbachA BremenHafen6 Datteln4 DuisburgWalsum10 Ensdorf1 Ensdorf3 Farge HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn7 Herne4 Heyden IbbenbürenB KarlsruheRDK7 KarlsruheRDK8 Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MoorburgA MoorburgB MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WestfalenE WilhelmshavenEON WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}44          
{txt}Number of variables        {res}          45   {txt}->   {res}3           
{txt}j variable (44 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau2 hourly_aveBergkamenA ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(43 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenB{col 76}WeiherC
{col 1}BergkamenA{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}ScholvenC{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}HamburgTie~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Staudinger5{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Hannover1{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~HKV{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Hannover2{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Völkling~MKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}Hastedt15{col 31}Lünen1{col 46}MünchenNord2{col 61}Wedel1{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Heilbronn7{col 31}MannheimAm~n{col 46}Rostock{col 61}Wedel2{col 76}Zolling
AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BremenHafen6: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Datteln4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}IbbenbürenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgA: all characters numeric; {res}replaced {txt}as {res}double
{txt}MoorburgB: all characters numeric; {res}replaced {txt}as {res}byte
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WestfalenE: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenEON: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenB{col 76}WeiherC
{col 1}BergkamenA{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}ScholvenC{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}HamburgTie~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Staudinger5{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Hannover1{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~HKV{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Hannover2{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Völkling~MKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}Hastedt15{col 31}Lünen1{col 46}MünchenNord2{col 61}Wedel1{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Heilbronn7{col 31}MannheimAm~n{col 46}Rostock{col 61}Wedel2{col 76}Zolling
{res}{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenB{col 76}WeiherC
{col 1}BergkamenA{col 16}Farge{col 31}Heyden{col 46}MannheimTNG{col 61}ScholvenC{col 76}WestfalenE
{col 1}BerlinReut~D{col 16}HamburgTie~2{col 31}IbbenbürenB{col 46}Mehrum3{col 61}Staudinger5{col 76}Wilhelmsha~N
{col 1}BerlinReut~E{col 16}Hannover1{col 31}KarlsruheR~7{col 46}MoorburgA{col 61}Völkling~HKV{col 76}Wilhelmsha~F
{col 1}BexbachA{col 16}Hannover2{col 31}KarlsruheR~8{col 46}MoorburgB{col 61}Völkling~MKV{col 76}WolfsburgW~1
{col 1}BremenHafen6{col 16}Hastedt15{col 31}Lünen1{col 46}MünchenNord2{col 61}Wedel1{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Heilbronn7{col 31}MannheimAm~n{col 46}Rostock{col 61}Wedel2{col 76}Zolling
{res}{txt}(j = AltbachDeizisau2 BergkamenA BerlinReuterD BerlinReuterE BexbachA BremenHafen6 Datteln4 DuisburgWalsum10 Farge HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn7 Herne4 Heyden IbbenbürenB KarlsruheRDK7 KarlsruheRDK8 Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MoorburgA MoorburgB MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WestfalenE WilhelmshavenEON WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}42          
{txt}Number of variables        {res}          43   {txt}->   {res}3           
{txt}j variable (42 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau2 hourly_aveBergkamenA ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(37 vars, 169 obs)
(1 observation deleted)
{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}Wedel2
{col 1}BergkamenA{col 16}Farge{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}WeiherC
{col 1}BerlinReut~D{col 16}HamburgTie~2{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BerlinReut~E{col 16}Hannover1{col 31}KarlsruheR~7{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BexbachA{col 16}Hannover2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hastedt15{col 31}Lünen1{col 46}Rostock{col 61}Wedel1{col 76}Zolling
AltbachDeizisau2: all characters numeric; {res}replaced {txt}as {res}double
{txt}BergkamenA: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterD: all characters numeric; {res}replaced {txt}as {res}double
{txt}BerlinReuterE: all characters numeric; {res}replaced {txt}as {res}double
{txt}BexbachA: all characters numeric; {res}replaced {txt}as {res}double
{txt}Datteln4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DuisburgWalsum10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Farge: all characters numeric; {res}replaced {txt}as {res}double
{txt}HamburgTiefstack2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hannover2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hastedt15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heilbronn7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Herne4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Heyden: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK7: all characters numeric; {res}replaced {txt}as {res}double
{txt}KarlsruheRDK8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lünen1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimAmprion: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimDB: all characters numeric; {res}replaced {txt}as {res}double
{txt}MannheimTNG: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mehrum3: all characters numeric; {res}replaced {txt}as {res}double
{txt}MünchenNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rostock: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenB: all characters numeric; {res}replaced {txt}as {res}double
{txt}ScholvenC: all characters numeric; {res}replaced {txt}as {res}double
{txt}Staudinger5: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneHKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}VölklingenFenneMKV: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wedel2: all characters numeric; {res}replaced {txt}as {res}double
{txt}WeiherC: all characters numeric; {res}replaced {txt}as {res}double
{txt}WilhelmshavenGDF: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest1: all characters numeric; {res}replaced {txt}as {res}double
{txt}WolfsburgWest2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Zolling: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}Wedel2
{col 1}BergkamenA{col 16}Farge{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}WeiherC
{col 1}BerlinReut~D{col 16}HamburgTie~2{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BerlinReut~E{col 16}Hannover1{col 31}KarlsruheR~7{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BexbachA{col 16}Hannover2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hastedt15{col 31}Lünen1{col 46}Rostock{col 61}Wedel1{col 76}Zolling
{res}{txt}{col 1}AltbachDei~2{col 16}DuisburgW~10{col 31}Heilbronn7{col 46}MannheimAm~n{col 61}ScholvenB{col 76}Wedel2
{col 1}BergkamenA{col 16}Farge{col 31}Herne4{col 46}MannheimDB{col 61}ScholvenC{col 76}WeiherC
{col 1}BerlinReut~D{col 16}HamburgTie~2{col 31}Heyden{col 46}MannheimTNG{col 61}Staudinger5{col 76}Wilhelmsha~F
{col 1}BerlinReut~E{col 16}Hannover1{col 31}KarlsruheR~7{col 46}Mehrum3{col 61}Völkling~HKV{col 76}WolfsburgW~1
{col 1}BexbachA{col 16}Hannover2{col 31}KarlsruheR~8{col 46}MünchenNord2{col 61}Völkling~MKV{col 76}WolfsburgW~2
{col 1}Datteln4{col 16}Hastedt15{col 31}Lünen1{col 46}Rostock{col 61}Wedel1{col 76}Zolling
{res}{txt}(j = AltbachDeizisau2 BergkamenA BerlinReuterD BerlinReuterE BexbachA Datteln4 DuisburgWalsum10 Farge HamburgTiefstack2 Hannover1 Hannover2 Hastedt15 Heilbronn7 Herne4 Heyden KarlsruheRDK7 KarlsruheRDK8 Lünen1 MannheimAmprion MannheimDB MannheimTNG Mehrum3 MünchenNord2 Rostock ScholvenB ScholvenC Staudinger5 VölklingenFenneHKV VölklingenFenneMKV Wedel1 Wedel2 WeiherC WilhelmshavenGDF WolfsburgWest1 WolfsburgWest2 Zolling)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}36          
{txt}Number of variables        {res}          37   {txt}->   {res}3           
{txt}j variable (36 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAltbachDeizisau2 hourly_aveBergkamenA ... hourly_aveZolling{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{text}(32 vars, 169 obs)
(1 observation deleted)
{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
Adamów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
{res}{txt}{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
{res}{txt}(j = Adamów1 Adamów2 Adamów3 Adamów4 Adamów5 Belchatów1 Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów13 Patnów14 Patnów15 Patnów16 Patnów29 Turów1 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}31          
{txt}Number of variables        {res}          32   {txt}->   {res}3           
{txt}j variable (31 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAdamów1 hourly_aveAdamów2 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(32 vars, 169 obs)
(1 observation deleted)
{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
Adamów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
{res}{txt}{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
{res}{txt}(j = Adamów1 Adamów2 Adamów3 Adamów4 Adamów5 Belchatów1 Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów13 Patnów14 Patnów15 Patnów16 Patnów29 Turów1 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}31          
{txt}Number of variables        {res}          32   {txt}->   {res}3           
{txt}j variable (31 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAdamów1 hourly_aveAdamów2 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(32 vars, 169 obs)
(1 observation deleted)
{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
Adamów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Adamów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
{res}{txt}{col 1}Adamów1{col 15}Belchatów1{col 29}Belchatów2{col 43}Belchatów7{col 57}Patnów13{col 71}Turów1{col 85}Turów6
{col 1}Adamów2{col 15}Belchatów10{col 29}Belchatów3{col 43}Belchatów8{col 57}Patnów14{col 71}Turów2
{col 1}Adamów3{col 15}Belchatów11{col 29}Belchatów4{col 43}Belchatów9{col 57}Patnów15{col 71}Turów3
{col 1}Adamów4{col 15}Belchatów12{col 29}Belchatów5{col 43}Patnów11{col 57}Patnów16{col 71}Turów4
{col 1}Adamów5{col 15}Belchatów14{col 29}Belchatów6{col 43}Patnów12{col 57}Patnów29{col 71}Turów5
{res}{txt}(j = Adamów1 Adamów2 Adamów3 Adamów4 Adamów5 Belchatów1 Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów13 Patnów14 Patnów15 Patnów16 Patnów29 Turów1 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}31          
{txt}Number of variables        {res}          32   {txt}->   {res}3           
{txt}j variable (31 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAdamów1 hourly_aveAdamów2 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(27 vars, 169 obs)
(1 observation deleted)
{col 1}Belchatów1{col 15}Belchatów14{col 29}Belchatów5{col 43}Belchatów9{col 57}Patnów14{col 71}Turów1{col 85}Turów5
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów2{col 85}Turów6
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów3
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów4
Belchatów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Belchatów1{col 15}Belchatów14{col 29}Belchatów5{col 43}Belchatów9{col 57}Patnów14{col 71}Turów1{col 85}Turów5
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów2{col 85}Turów6
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów3
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów4
{res}{txt}{col 1}Belchatów1{col 15}Belchatów14{col 29}Belchatów5{col 43}Belchatów9{col 57}Patnów14{col 71}Turów1{col 85}Turów5
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów2{col 85}Turów6
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów3
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów4
{res}{txt}(j = Belchatów1 Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów13 Patnów14 Patnów15 Patnów16 Patnów29 Turów1 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}26          
{txt}Number of variables        {res}          27   {txt}->   {res}3           
{txt}j variable (26 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBelchatów1 hourly_aveBelchatów10 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(27 vars, 169 obs)
(1 observation deleted)
{col 1}Belchatów1{col 15}Belchatów14{col 29}Belchatów5{col 43}Belchatów9{col 57}Patnów14{col 71}Turów1{col 85}Turów5
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów2{col 85}Turów6
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów3
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów4
Belchatów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Belchatów1{col 15}Belchatów14{col 29}Belchatów5{col 43}Belchatów9{col 57}Patnów14{col 71}Turów1{col 85}Turów5
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów2{col 85}Turów6
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów3
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów4
{res}{txt}{col 1}Belchatów1{col 15}Belchatów14{col 29}Belchatów5{col 43}Belchatów9{col 57}Patnów14{col 71}Turów1{col 85}Turów5
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów2{col 85}Turów6
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów3
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów4
{res}{txt}(j = Belchatów1 Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów13 Patnów14 Patnów15 Patnów16 Patnów29 Turów1 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}26          
{txt}Number of variables        {res}          27   {txt}->   {res}3           
{txt}j variable (26 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBelchatów1 hourly_aveBelchatów10 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(27 vars, 169 obs)
(1 observation deleted)
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów11{col 85}Turów5
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów2{col 85}Turów6
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów3
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów14{col 57}Turów1{col 71}Turów4
Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów14: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów11{col 85}Turów5
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów2{col 85}Turów6
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów3
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów14{col 57}Turów1{col 71}Turów4
{res}{txt}{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Patnów15{col 71}Turów11{col 85}Turów5
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Patnów16{col 71}Turów2{col 85}Turów6
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów13{col 57}Patnów29{col 71}Turów3
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów14{col 57}Turów1{col 71}Turów4
{res}{txt}(j = Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów13 Patnów14 Patnów15 Patnów16 Patnów29 Turów1 Turów11 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}26          
{txt}Number of variables        {res}          27   {txt}->   {res}3           
{txt}j variable (26 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBelchatów10 hourly_aveBelchatów11 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(24 vars, 169 obs)
(1 observation deleted)
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Turów1{col 71}Turów4
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Turów11{col 71}Turów5
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów15{col 57}Turów2{col 71}Turów6
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów29{col 57}Turów3
Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Turów1{col 71}Turów4
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Turów11{col 71}Turów5
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów15{col 57}Turów2{col 71}Turów6
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów29{col 57}Turów3
{res}{txt}{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Turów1{col 71}Turów4
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Turów11{col 71}Turów5
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów15{col 57}Turów2{col 71}Turów6
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów29{col 57}Turów3
{res}{txt}(j = Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów15 Patnów29 Turów1 Turów11 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}23          
{txt}Number of variables        {res}          24   {txt}->   {res}3           
{txt}j variable (23 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBelchatów10 hourly_aveBelchatów11 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(24 vars, 169 obs)
(1 observation deleted)
{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Turów1{col 71}Turów4
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Turów11{col 71}Turów5
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów15{col 57}Turów2{col 71}Turów6
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów29{col 57}Turów3
Belchatów10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Belchatów9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Patnów29: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Turów6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Turów1{col 71}Turów4
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Turów11{col 71}Turów5
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów15{col 57}Turów2{col 71}Turów6
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów29{col 57}Turów3
{res}{txt}{col 1}Belchatów10{col 15}Belchatów2{col 29}Belchatów6{col 43}Patnów11{col 57}Turów1{col 71}Turów4
{col 1}Belchatów11{col 15}Belchatów3{col 29}Belchatów7{col 43}Patnów12{col 57}Turów11{col 71}Turów5
{col 1}Belchatów12{col 15}Belchatów4{col 29}Belchatów8{col 43}Patnów15{col 57}Turów2{col 71}Turów6
{col 1}Belchatów14{col 15}Belchatów5{col 29}Belchatów9{col 43}Patnów29{col 57}Turów3
{res}{txt}(j = Belchatów10 Belchatów11 Belchatów12 Belchatów14 Belchatów2 Belchatów3 Belchatów4 Belchatów5 Belchatów6 Belchatów7 Belchatów8 Belchatów9 Patnów11 Patnów12 Patnów15 Patnów29 Turów1 Turów11 Turów2 Turów3 Turów4 Turów5 Turów6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}23          
{txt}Number of variables        {res}          24   {txt}->   {res}3           
{txt}j variable (23 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBelchatów10 hourly_aveBelchatów11 ... hourly_aveTurów6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(82 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Siersza6
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina33
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice29{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina34
{col 1}DolnaOdra2{col 15}Karolin3{col 29}KrakówLeg1{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}Skawina35
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg2{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}Skawina36
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg3{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}StalowaWol~7
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg4{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}StalowaWol~8
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}Lagisza10{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza5{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza5
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra1: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina34: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna7: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Siersza6
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina33
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice29{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina34
{col 1}DolnaOdra2{col 15}Karolin3{col 29}KrakówLeg1{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}Skawina35
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg2{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}Skawina36
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg3{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}StalowaWol~7
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg4{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}StalowaWol~8
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}Lagisza10{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza5{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza5
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Siersza6
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina33
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice29{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina34
{col 1}DolnaOdra2{col 15}Karolin3{col 29}KrakówLeg1{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}Skawina35
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg2{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}Skawina36
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg3{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}StalowaWol~7
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg4{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}StalowaWol~8
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}Lagisza10{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza5{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza5
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra1 DolnaOdra2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Lagisza5 Lagisza6 Lagisza7 Laziska21 Laziska22 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik1 Rybnik2 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Siersza3 Siersza5 Siersza6 Skawina33 Skawina34 Skawina35 Skawina36 StalowaWolaPasywna7 StalowaWolaPasywna8 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}81          
{txt}Number of variables        {res}          82   {txt}->   {res}3           
{txt}j variable (81 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(79 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra2{col 15}Karolin3{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}Lagisza10{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza6
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska22{col 43}OstrolekaB3{col 57}Rybnik5{col 71}Skawina33
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra1: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna7: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra2{col 15}Karolin3{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}Lagisza10{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza6
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska22{col 43}OstrolekaB3{col 57}Rybnik5{col 71}Skawina33
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra2{col 15}Karolin3{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}Lagisza10{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza6
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska22{col 43}OstrolekaB3{col 57}Rybnik5{col 71}Skawina33
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra1 DolnaOdra2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Lagisza6 Lagisza7 Laziska21 Laziska22 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik1 Rybnik2 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Siersza3 Siersza6 Skawina33 Skawina35 Skawina36 StalowaWolaPasywna7 StalowaWolaPasywna8 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}78          
{txt}Number of variables        {res}          79   {txt}->   {res}3           
{txt}j variable (78 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(80 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra2{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza6
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra1: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice211: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna7: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra2{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza6
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra1{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra2{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra3{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}DolnaOdra4{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}DolnaOdra5{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}DolnaOdra6{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Rybnik1{col 71}Siersza1
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Rybnik2{col 71}Siersza2
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}OstrolekaB1{col 57}Rybnik3{col 71}Siersza3
{col 1}Jaworzno34{col 15}Kozienice17{col 29}Laziska21{col 43}OstrolekaB2{col 57}Rybnik4{col 71}Siersza6
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra1 DolnaOdra2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice211 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Lagisza6 Lagisza7 Laziska21 Laziska22 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik1 Rybnik2 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Siersza3 Siersza6 Skawina33 Skawina35 Skawina36 StalowaWolaPasywna7 StalowaWolaPasywna8 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}79          
{txt}Number of variables        {res}          80   {txt}->   {res}3           
{txt}j variable (79 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(83 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra1: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno27: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice211: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole5: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Opole6: all characters numeric; {res}replaced {txt}as {res}byte
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna7: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra1 DolnaOdra2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno27 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice211 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Lagisza6 Lagisza7 Laziska21 Laziska22 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 Opole5 Opole6 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik1 Rybnik2 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Siersza3 Siersza6 Skawina33 Skawina35 Skawina36 StalowaWolaPasywna7 StalowaWolaPasywna8 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}82          
{txt}Number of variables        {res}          83   {txt}->   {res}3           
{txt}j variable (82 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(83 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra1: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno27: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice211: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole6: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna7: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra1 DolnaOdra2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno27 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice211 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Lagisza6 Lagisza7 Laziska21 Laziska22 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 Opole5 Opole6 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik1 Rybnik2 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Siersza3 Siersza6 Skawina33 Skawina35 Skawina36 StalowaWolaPasywna7 StalowaWolaPasywna8 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}82          
{txt}Number of variables        {res}          83   {txt}->   {res}3           
{txt}j variable (82 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(83 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra1: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno27: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice211: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole6: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Siersza6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna7: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice17{col 43}Laziska21{col 57}Opole6{col 71}Rybnik2{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice18{col 43}Laziska22{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza3
{col 1}DolnaOdra1{col 15}Jaworzno36{col 29}Kozienice210{col 43}Laziska310{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza6
{col 1}DolnaOdra2{col 15}Karolin2{col 29}Kozienice211{col 43}Laziska311{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin3{col 29}Kozienice29{col 43}Laziska312{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Katowice{col 29}KrakówLeg1{col 43}Laziska39{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Kozienice11{col 29}KrakówLeg2{col 43}Lódz43{col 57}Polaniec3{col 71}Rybnik8{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice12{col 29}KrakówLeg3{col 43}Opole1{col 57}Polaniec4{col 71}Siekierki10{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice13{col 29}KrakówLeg4{col 43}Opole2{col 57}Polaniec5{col 71}Siekierki7{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice14{col 29}Lagisza10{col 43}Opole3{col 57}Polaniec6{col 71}Siekierki8{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice15{col 29}Lagisza6{col 43}Opole4{col 57}Polaniec7{col 71}Siekierki9
{col 1}Jaworzno33{col 15}Kozienice16{col 29}Lagisza7{col 43}Opole5{col 57}Rybnik1{col 71}Siersza1
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra1 DolnaOdra2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno27 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice211 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Lagisza6 Lagisza7 Laziska21 Laziska22 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 Opole5 Opole6 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik1 Rybnik2 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Siersza3 Siersza6 Skawina33 Skawina35 Skawina36 StalowaWolaPasywna7 StalowaWolaPasywna8 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}82          
{txt}Number of variables        {res}          83   {txt}->   {res}3           
{txt}j variable (82 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(75 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice17{col 43}Laziska311{col 57}OstrolekaB2{col 71}Rybnik3{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice18{col 43}Laziska312{col 57}OstrolekaB3{col 71}Rybnik4{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin2{col 29}Kozienice210{col 43}Laziska39{col 57}Polaniec1{col 71}Rybnik5{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Karolin3{col 29}Kozienice211{col 43}Lódz43{col 57}Polaniec2{col 71}Rybnik6{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Katowice{col 29}Kozienice29{col 43}Opole1{col 57}Polaniec3{col 71}Rybnik7{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice11{col 29}KrakówLeg1{col 43}Opole2{col 57}Polaniec4{col 71}Rybnik8{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice12{col 29}KrakówLeg2{col 43}Opole3{col 57}Polaniec5{col 71}Siekierki10{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice13{col 29}KrakówLeg3{col 43}Opole4{col 57}Polaniec6{col 71}Siekierki7{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice14{col 29}KrakówLeg4{col 43}Opole5{col 57}Polaniec7{col 71}Siekierki8
{col 1}Jaworzno33{col 15}Kozienice15{col 29}Lagisza10{col 43}Opole6{col 57}Rybnik1{col 71}Siekierki9
{col 1}Jaworzno34{col 15}Kozienice16{col 29}Laziska310{col 43}OstrolekaB1{col 57}Rybnik2{col 71}Siersza1
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno27: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice211: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole6: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}StalowaWolaPasywna7: all characters numeric; {res}replaced {txt}as {res}byte
{txt}StalowaWolaPasywna8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice17{col 43}Laziska311{col 57}OstrolekaB2{col 71}Rybnik3{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice18{col 43}Laziska312{col 57}OstrolekaB3{col 71}Rybnik4{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin2{col 29}Kozienice210{col 43}Laziska39{col 57}Polaniec1{col 71}Rybnik5{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Karolin3{col 29}Kozienice211{col 43}Lódz43{col 57}Polaniec2{col 71}Rybnik6{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Katowice{col 29}Kozienice29{col 43}Opole1{col 57}Polaniec3{col 71}Rybnik7{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice11{col 29}KrakówLeg1{col 43}Opole2{col 57}Polaniec4{col 71}Rybnik8{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice12{col 29}KrakówLeg2{col 43}Opole3{col 57}Polaniec5{col 71}Siekierki10{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice13{col 29}KrakówLeg3{col 43}Opole4{col 57}Polaniec6{col 71}Siekierki7{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice14{col 29}KrakówLeg4{col 43}Opole5{col 57}Polaniec7{col 71}Siekierki8
{col 1}Jaworzno33{col 15}Kozienice15{col 29}Lagisza10{col 43}Opole6{col 57}Rybnik1{col 71}Siekierki9
{col 1}Jaworzno34{col 15}Kozienice16{col 29}Laziska310{col 43}OstrolekaB1{col 57}Rybnik2{col 71}Siersza1
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno35{col 29}Kozienice17{col 43}Laziska311{col 57}OstrolekaB2{col 71}Rybnik3{col 85}Siersza2
{col 1}Chorzów2{col 15}Jaworzno36{col 29}Kozienice18{col 43}Laziska312{col 57}OstrolekaB3{col 71}Rybnik4{col 85}Skawina33
{col 1}DolnaOdra3{col 15}Karolin2{col 29}Kozienice210{col 43}Laziska39{col 57}Polaniec1{col 71}Rybnik5{col 85}Skawina35
{col 1}DolnaOdra4{col 15}Karolin3{col 29}Kozienice211{col 43}Lódz43{col 57}Polaniec2{col 71}Rybnik6{col 85}Skawina36
{col 1}DolnaOdra5{col 15}Katowice{col 29}Kozienice29{col 43}Opole1{col 57}Polaniec3{col 71}Rybnik7{col 85}StalowaWol~7
{col 1}DolnaOdra6{col 15}Kozienice11{col 29}KrakówLeg1{col 43}Opole2{col 57}Polaniec4{col 71}Rybnik8{col 85}StalowaWol~8
{col 1}Jaworzno27{col 15}Kozienice12{col 29}KrakówLeg2{col 43}Opole3{col 57}Polaniec5{col 71}Siekierki10{col 85}Wroclaw2
{col 1}Jaworzno31{col 15}Kozienice13{col 29}KrakówLeg3{col 43}Opole4{col 57}Polaniec6{col 71}Siekierki7{col 85}Wroclaw3
{col 1}Jaworzno32{col 15}Kozienice14{col 29}KrakówLeg4{col 43}Opole5{col 57}Polaniec7{col 71}Siekierki8
{col 1}Jaworzno33{col 15}Kozienice15{col 29}Lagisza10{col 43}Opole6{col 57}Rybnik1{col 71}Siekierki9
{col 1}Jaworzno34{col 15}Kozienice16{col 29}Laziska310{col 43}OstrolekaB1{col 57}Rybnik2{col 71}Siersza1
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno27 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice211 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 Opole5 Opole6 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik1 Rybnik2 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Skawina33 Skawina35 Skawina36 StalowaWolaPasywna7 StalowaWolaPasywna8 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}74          
{txt}Number of variables        {res}          75   {txt}->   {res}3           
{txt}j variable (74 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(71 vars, 169 obs)
(1 observation deleted)
{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice15{col 43}KrakówLeg4{col 57}Opole4{col 71}Polaniec5{col 85}Siekierki7
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice16{col 43}Lagisza10{col 57}Opole5{col 71}Polaniec6{col 85}Siekierki8
{col 1}DolnaOdra3{col 15}Jaworzno36{col 29}Kozienice17{col 43}Laziska310{col 57}Opole6{col 71}Polaniec7{col 85}Siekierki9
{col 1}DolnaOdra4{col 15}Karolin2{col 29}Kozienice18{col 43}Laziska311{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza1
{col 1}DolnaOdra5{col 15}Karolin3{col 29}Kozienice210{col 43}Laziska312{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza2
{col 1}DolnaOdra6{col 15}Katowice{col 29}Kozienice211{col 43}Laziska39{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}Jaworzno27{col 15}Kozienice11{col 29}Kozienice29{col 43}Lódz43{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}Jaworzno31{col 15}Kozienice12{col 29}KrakówLeg1{col 43}Opole1{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}Jaworzno32{col 15}Kozienice13{col 29}KrakówLeg2{col 43}Opole2{col 57}Polaniec3{col 71}Rybnik8{col 85}Wroclaw2
{col 1}Jaworzno33{col 15}Kozienice14{col 29}KrakówLeg3{col 43}Opole3{col 57}Polaniec4{col 71}Siekierki10{col 85}Wroclaw3
Chorzów1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chorzów2: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}DolnaOdra6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno27: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno31: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno32: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno34: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Jaworzno36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Karolin3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Katowice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice11: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice12: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice13: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice14: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice15: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice16: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice17: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice18: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice210: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice211: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kozienice29: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg1: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg2: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg3: all characters numeric; {res}replaced {txt}as {res}double
{txt}KrakówLeg4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lagisza10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska310: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska311: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska312: all characters numeric; {res}replaced {txt}as {res}double
{txt}Laziska39: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lódz43: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Opole6: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB1: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB2: all characters numeric; {res}replaced {txt}as {res}double
{txt}OstrolekaB3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Polaniec7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik6: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Rybnik8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki10: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki8: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siekierki9: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Siersza2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina33: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina35: all characters numeric; {res}replaced {txt}as {res}double
{txt}Skawina36: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Wroclaw3: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice15{col 43}KrakówLeg4{col 57}Opole4{col 71}Polaniec5{col 85}Siekierki7
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice16{col 43}Lagisza10{col 57}Opole5{col 71}Polaniec6{col 85}Siekierki8
{col 1}DolnaOdra3{col 15}Jaworzno36{col 29}Kozienice17{col 43}Laziska310{col 57}Opole6{col 71}Polaniec7{col 85}Siekierki9
{col 1}DolnaOdra4{col 15}Karolin2{col 29}Kozienice18{col 43}Laziska311{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza1
{col 1}DolnaOdra5{col 15}Karolin3{col 29}Kozienice210{col 43}Laziska312{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza2
{col 1}DolnaOdra6{col 15}Katowice{col 29}Kozienice211{col 43}Laziska39{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}Jaworzno27{col 15}Kozienice11{col 29}Kozienice29{col 43}Lódz43{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}Jaworzno31{col 15}Kozienice12{col 29}KrakówLeg1{col 43}Opole1{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}Jaworzno32{col 15}Kozienice13{col 29}KrakówLeg2{col 43}Opole2{col 57}Polaniec3{col 71}Rybnik8{col 85}Wroclaw2
{col 1}Jaworzno33{col 15}Kozienice14{col 29}KrakówLeg3{col 43}Opole3{col 57}Polaniec4{col 71}Siekierki10{col 85}Wroclaw3
{res}{txt}{col 1}Chorzów1{col 15}Jaworzno34{col 29}Kozienice15{col 43}KrakówLeg4{col 57}Opole4{col 71}Polaniec5{col 85}Siekierki7
{col 1}Chorzów2{col 15}Jaworzno35{col 29}Kozienice16{col 43}Lagisza10{col 57}Opole5{col 71}Polaniec6{col 85}Siekierki8
{col 1}DolnaOdra3{col 15}Jaworzno36{col 29}Kozienice17{col 43}Laziska310{col 57}Opole6{col 71}Polaniec7{col 85}Siekierki9
{col 1}DolnaOdra4{col 15}Karolin2{col 29}Kozienice18{col 43}Laziska311{col 57}OstrolekaB1{col 71}Rybnik3{col 85}Siersza1
{col 1}DolnaOdra5{col 15}Karolin3{col 29}Kozienice210{col 43}Laziska312{col 57}OstrolekaB2{col 71}Rybnik4{col 85}Siersza2
{col 1}DolnaOdra6{col 15}Katowice{col 29}Kozienice211{col 43}Laziska39{col 57}OstrolekaB3{col 71}Rybnik5{col 85}Skawina33
{col 1}Jaworzno27{col 15}Kozienice11{col 29}Kozienice29{col 43}Lódz43{col 57}Polaniec1{col 71}Rybnik6{col 85}Skawina35
{col 1}Jaworzno31{col 15}Kozienice12{col 29}KrakówLeg1{col 43}Opole1{col 57}Polaniec2{col 71}Rybnik7{col 85}Skawina36
{col 1}Jaworzno32{col 15}Kozienice13{col 29}KrakówLeg2{col 43}Opole2{col 57}Polaniec3{col 71}Rybnik8{col 85}Wroclaw2
{col 1}Jaworzno33{col 15}Kozienice14{col 29}KrakówLeg3{col 43}Opole3{col 57}Polaniec4{col 71}Siekierki10{col 85}Wroclaw3
{res}{txt}(j = Chorzów1 Chorzów2 DolnaOdra3 DolnaOdra4 DolnaOdra5 DolnaOdra6 Jaworzno27 Jaworzno31 Jaworzno32 Jaworzno33 Jaworzno34 Jaworzno35 Jaworzno36 Karolin2 Karolin3 Katowice Kozienice11 Kozienice12 Kozienice13 Kozienice14 Kozienice15 Kozienice16 Kozienice17 Kozienice18 Kozienice210 Kozienice211 Kozienice29 KrakówLeg1 KrakówLeg2 KrakówLeg3 KrakówLeg4 Lagisza10 Laziska310 Laziska311 Laziska312 Laziska39 Lódz43 Opole1 Opole2 Opole3 Opole4 Opole5 Opole6 OstrolekaB1 OstrolekaB2 OstrolekaB3 Polaniec1 Polaniec2 Polaniec3 Polaniec4 Polaniec5 Polaniec6 Polaniec7 Rybnik3 Rybnik4 Rybnik5 Rybnik6 Rybnik7 Rybnik8 Siekierki10 Siekierki7 Siekierki8 Siekierki9 Siersza1 Siersza2 Skawina33 Skawina35 Skawina36 Wroclaw2 Wroclaw3)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}70          
{txt}Number of variables        {res}          71   {txt}->   {res}3           
{txt}j variable (70 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChorzów1 hourly_aveChorzów2 ... hourly_aveWroclaw3{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str19} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(14 vars, 169 obs)
(1 observation deleted)
{col 1}Bouchain1{col 16}GardannePr~5{col 31}LaMaxe2{col 46}VitrysurSe~4{col 61}ÉmileHuchet6
{col 1}Cordemais4{col 16}Havre4{col 31}Montceaule~3{col 46}ÉmileHuchet4
{col 1}Cordemais5{col 16}LaMaxe1{col 31}VitrysurSe~3{col 46}ÉmileHuchet5
Bouchain1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}double
{txt}LaMaxe1: all characters numeric; {res}replaced {txt}as {res}double
{txt}LaMaxe2: all characters numeric; {res}replaced {txt}as {res}double
{txt}MontceaulesMinesLucy3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}VitrysurSeine3: all characters numeric; {res}replaced {txt}as {res}double
{txt}VitrysurSeine4: all characters numeric; {res}replaced {txt}as {res}double
{txt}ÉmileHuchet4: all characters numeric; {res}replaced {txt}as {res}byte
{txt}ÉmileHuchet5: all characters numeric; {res}replaced {txt}as {res}byte
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Bouchain1{col 16}GardannePr~5{col 31}LaMaxe2{col 46}VitrysurSe~4{col 61}ÉmileHuchet6
{col 1}Cordemais4{col 16}Havre4{col 31}Montceaule~3{col 46}ÉmileHuchet4
{col 1}Cordemais5{col 16}LaMaxe1{col 31}VitrysurSe~3{col 46}ÉmileHuchet5
{res}{txt}{col 1}Bouchain1{col 16}GardannePr~5{col 31}LaMaxe2{col 46}VitrysurSe~4{col 61}ÉmileHuchet6
{col 1}Cordemais4{col 16}Havre4{col 31}Montceaule~3{col 46}ÉmileHuchet4
{col 1}Cordemais5{col 16}LaMaxe1{col 31}VitrysurSe~3{col 46}ÉmileHuchet5
{res}{txt}(j = Bouchain1 Cordemais4 Cordemais5 GardanneProvence5 Havre4 LaMaxe1 LaMaxe2 MontceaulesMinesLucy3 VitrysurSeine3 VitrysurSeine4 ÉmileHuchet4 ÉmileHuchet5 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}13          
{txt}Number of variables        {res}          14   {txt}->   {res}3           
{txt}j variable (13 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveBouchain1 hourly_aveCordemais4 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(6 vars, 169 obs)
(1 observation deleted)
{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}double
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}(j = Cordemais4 Cordemais5 GardanneProvence5 Havre4 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}5           
{txt}Number of variables        {res}           6   {txt}->   {res}3           
{txt}j variable (5 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveCordemais4 hourly_aveCordemais5 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str17}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(6 vars, 169 obs)
(1 observation deleted)
{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}double
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}(j = Cordemais4 Cordemais5 GardanneProvence5 Havre4 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}5           
{txt}Number of variables        {res}           6   {txt}->   {res}3           
{txt}j variable (5 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveCordemais4 hourly_aveCordemais5 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str17}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(6 vars, 169 obs)
(1 observation deleted)
{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}double
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}(j = Cordemais4 Cordemais5 GardanneProvence5 Havre4 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}5           
{txt}Number of variables        {res}           6   {txt}->   {res}3           
{txt}j variable (5 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveCordemais4 hourly_aveCordemais5 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str17}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(6 vars, 169 obs)
(1 observation deleted)
{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}double
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}(j = Cordemais4 Cordemais5 GardanneProvence5 Havre4 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}5           
{txt}Number of variables        {res}           6   {txt}->   {res}3           
{txt}j variable (5 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveCordemais4 hourly_aveCordemais5 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str17}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(6 vars, 169 obs)
(1 observation deleted)
{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}double
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}(j = Cordemais4 Cordemais5 GardanneProvence5 Havre4 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}5           
{txt}Number of variables        {res}           6   {txt}->   {res}3           
{txt}j variable (5 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveCordemais4 hourly_aveCordemais5 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str17}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(6 vars, 169 obs)
(1 observation deleted)
{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}double
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}(j = Cordemais4 Cordemais5 GardanneProvence5 Havre4 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}5           
{txt}Number of variables        {res}           6   {txt}->   {res}3           
{txt}j variable (5 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveCordemais4 hourly_aveCordemais5 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str17}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(6 vars, 169 obs)
(1 observation deleted)
{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
Cordemais4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Cordemais5: all characters numeric; {res}replaced {txt}as {res}double
{txt}GardanneProvence5: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Havre4: all characters numeric; {res}replaced {txt}as {res}byte
{txt}ÉmileHuchet6: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}{col 1}Cordemais4{col 16}Cordemais5{col 31}GardannePr~5{col 46}Havre4{col 61}ÉmileHuchet6
{res}{txt}(j = Cordemais4 Cordemais5 GardanneProvence5 Havre4 ÉmileHuchet6)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}5           
{txt}Number of variables        {res}           6   {txt}->   {res}3           
{txt}j variable (5 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveCordemais4 hourly_aveCordemais5 ... hourly_aveÉmileHuchet6{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str17}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str7} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}Dürnrohr{col 16}DürnrohrBl~2{col 31}Mellach{col 46}Riedersbac~2
Dürnrohr: all characters numeric; {res}replaced {txt}as {res}double
{txt}DürnrohrBlock2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mellach: all characters numeric; {res}replaced {txt}as {res}double
{txt}Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dürnrohr{col 16}DürnrohrBl~2{col 31}Mellach{col 46}Riedersbac~2
{res}{txt}{col 1}Dürnrohr{col 16}DürnrohrBl~2{col 31}Mellach{col 46}Riedersbac~2
{res}{txt}(j = Dürnrohr DürnrohrBlock2 Mellach Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDürnrohr hourly_aveDürnrohrBlock2 ... hourly_aveRiedersbach2G2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
DürnrohrBlock2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mellach: all characters numeric; {res}replaced {txt}as {res}double
{txt}Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}(j = DürnrohrBlock2 Mellach Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDürnrohrBlock2 hourly_aveMellach hourly_aveRiedersbach2G2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
DürnrohrBlock2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mellach: all characters numeric; {res}replaced {txt}as {res}double
{txt}Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}(j = DürnrohrBlock2 Mellach Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDürnrohrBlock2 hourly_aveMellach hourly_aveRiedersbach2G2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
DürnrohrBlock2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mellach: all characters numeric; {res}replaced {txt}as {res}double
{txt}Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}(j = DürnrohrBlock2 Mellach Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDürnrohrBlock2 hourly_aveMellach hourly_aveRiedersbach2G2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
DürnrohrBlock2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mellach: all characters numeric; {res}replaced {txt}as {res}double
{txt}Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}(j = DürnrohrBlock2 Mellach Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDürnrohrBlock2 hourly_aveMellach hourly_aveRiedersbach2G2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
DürnrohrBlock2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mellach: all characters numeric; {res}replaced {txt}as {res}double
{txt}Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}{col 1}DürnrohrBl~2{col 16}Mellach{col 31}Riedersbac~2
{res}{txt}(j = DürnrohrBlock2 Mellach Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDürnrohrBlock2 hourly_aveMellach hourly_aveRiedersbach2G2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(2 vars, 169 obs)
(1 observation deleted)
{col 1}Riedersbac~2
Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}Riedersbac~2
{res}{txt}{col 1}Riedersbac~2
{res}{txt}(j = Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}1           
{txt}Number of variables        {res}           2   {txt}->   {res}3           
{txt}j variable (1 values)                     ->   {res}facility_name
{txt}xij variables:
               {res}hourly_aveRiedersbach2G2   {txt}->   {res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(2 vars, 169 obs)
(1 observation deleted)
{col 1}Riedersbac~2
Riedersbach2G2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}Riedersbac~2
{res}{txt}{col 1}Riedersbac~2
{res}{txt}(j = Riedersbach2G2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}1           
{txt}Number of variables        {res}           2   {txt}->   {res}3           
{txt}j variable (1 values)                     ->   {res}facility_name
{txt}xij variables:
               {res}hourly_aveRiedersbach2G2   {txt}->   {res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str14}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(21 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady1{col 57}Počerady4{col 71}Prunéřov22{col 85}Tušimice23
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady2{col 57}Počerady5{col 71}Tušimice21{col 85}Tušimice24
{col 1}Chvaletice3{col 15}Kladno5{col 29}Mělník3{col 43}Počerady3{col 57}Prunéřov21{col 71}Tušimice22
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mělník3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady1{col 57}Počerady4{col 71}Prunéřov22{col 85}Tušimice23
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady2{col 57}Počerady5{col 71}Tušimice21{col 85}Tušimice24
{col 1}Chvaletice3{col 15}Kladno5{col 29}Mělník3{col 43}Počerady3{col 57}Prunéřov21{col 71}Tušimice22
{res}{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady1{col 57}Počerady4{col 71}Prunéřov22{col 85}Tušimice23
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady2{col 57}Počerady5{col 71}Tušimice21{col 85}Tušimice24
{col 1}Chvaletice3{col 15}Kladno5{col 29}Mělník3{col 43}Počerady3{col 57}Prunéřov21{col 71}Tušimice22
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Mělník3 Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov21 Prunéřov22 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}20          
{txt}Number of variables        {res}          21   {txt}->   {res}3           
{txt}j variable (20 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(24 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov23{col 71}Tušimice22
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Prunéřov24{col 71}Tušimice23
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov21{col 57}Prunéřov25{col 71}Tušimice24
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov22{col 57}Tušimice21
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mělník3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov23: all characters numeric; {res}replaced {txt}as {res}byte
{txt}(168 missing values generated)
{res}{txt}Prunéřov24: all characters numeric; {res}replaced {txt}as {res}byte
{txt}(168 missing values generated)
{res}{txt}Prunéřov25: all characters numeric; {res}replaced {txt}as {res}byte
{txt}(168 missing values generated)
{res}{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov23{col 71}Tušimice22
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Prunéřov24{col 71}Tušimice23
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov21{col 57}Prunéřov25{col 71}Tušimice24
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov22{col 57}Tušimice21
{res}{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov23{col 71}Tušimice22
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Prunéřov24{col 71}Tušimice23
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov21{col 57}Prunéřov25{col 71}Tušimice24
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov22{col 57}Tušimice21
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Mělník3 Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov21 Prunéřov22 Prunéřov23 Prunéřov24 Prunéřov25 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}23          
{txt}Number of variables        {res}          24   {txt}->   {res}3           
{txt}j variable (23 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(22 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady1{col 57}Počerady4{col 71}Prunéřov24{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Mělník3{col 43}Počerady3{col 57}Prunéřov23{col 71}Tušimice21{col 85}Tušimice24
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mělník3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov24: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov25: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady1{col 57}Počerady4{col 71}Prunéřov24{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Mělník3{col 43}Počerady3{col 57}Prunéřov23{col 71}Tušimice21{col 85}Tušimice24
{res}{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady1{col 57}Počerady4{col 71}Prunéřov24{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Mělník3{col 43}Počerady3{col 57}Prunéřov23{col 71}Tušimice21{col 85}Tušimice24
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Mělník3 Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov23 Prunéřov24 Prunéřov25 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}21          
{txt}Number of variables        {res}          22   {txt}->   {res}3           
{txt}j variable (21 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(23 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mělník3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov24: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov25: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tisová2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
{res}{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Mělník3 Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov23 Prunéřov24 Prunéřov25 Tisová2 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}22          
{txt}Number of variables        {res}          23   {txt}->   {res}3           
{txt}j variable (22 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(23 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mělník3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov24: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov25: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tisová2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
{res}{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Mělník3 Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov23 Prunéřov24 Prunéřov25 Tisová2 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}22          
{txt}Number of variables        {res}          23   {txt}->   {res}3           
{txt}j variable (22 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(23 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mělník3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov24: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov25: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tisová2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
{res}{txt}{col 1}Chvaletice1{col 15}Kladno4{col 29}Mělník3{col 43}Počerady4{col 57}Prunéřov25{col 71}Tušimice23
{col 1}Chvaletice2{col 15}Kladno5{col 29}Počerady1{col 43}Počerady5{col 57}Tisová2{col 71}Tušimice24
{col 1}Chvaletice3{col 15}Kladno7{col 29}Počerady2{col 43}Prunéřov23{col 57}Tušimice21
{col 1}Chvaletice4{col 15}Ledvice{col 29}Počerady3{col 43}Prunéřov24{col 57}Tušimice22
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Mělník3 Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov23 Prunéřov24 Prunéřov25 Tisová2 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}22          
{txt}Number of variables        {res}          23   {txt}->   {res}3           
{txt}j variable (22 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(22 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady3{col 57}Prunéřov23{col 71}Tisová2{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Počerady1{col 43}Počerady4{col 57}Prunéřov24{col 71}Tušimice21{col 85}Tušimice24
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov24: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov25: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tisová2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady3{col 57}Prunéřov23{col 71}Tisová2{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Počerady1{col 43}Počerady4{col 57}Prunéřov24{col 71}Tušimice21{col 85}Tušimice24
{res}{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady3{col 57}Prunéřov23{col 71}Tisová2{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Počerady1{col 43}Počerady4{col 57}Prunéřov24{col 71}Tušimice21{col 85}Tušimice24
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov23 Prunéřov24 Prunéřov25 Tisová2 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}21          
{txt}Number of variables        {res}          22   {txt}->   {res}3           
{txt}j variable (21 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(22 vars, 169 obs)
(1 observation deleted)
{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady3{col 57}Prunéřov23{col 71}Tisová2{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Počerady1{col 43}Počerady4{col 57}Prunéřov24{col 71}Tušimice21{col 85}Tušimice24
Chvaletice1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Chvaletice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kladno7: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ledvice: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Počerady5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov24: all characters numeric; {res}replaced {txt}as {res}double
{txt}Prunéřov25: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tisová2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice21: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice22: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice23: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tušimice24: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady3{col 57}Prunéřov23{col 71}Tisová2{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Počerady1{col 43}Počerady4{col 57}Prunéřov24{col 71}Tušimice21{col 85}Tušimice24
{res}{txt}{col 1}Chvaletice1{col 15}Chvaletice4{col 29}Kladno7{col 43}Počerady2{col 57}Počerady5{col 71}Prunéřov25{col 85}Tušimice22
{col 1}Chvaletice2{col 15}Kladno4{col 29}Ledvice{col 43}Počerady3{col 57}Prunéřov23{col 71}Tisová2{col 85}Tušimice23
{col 1}Chvaletice3{col 15}Kladno5{col 29}Počerady1{col 43}Počerady4{col 57}Prunéřov24{col 71}Tušimice21{col 85}Tušimice24
{res}{txt}(j = Chvaletice1 Chvaletice2 Chvaletice3 Chvaletice4 Kladno4 Kladno5 Kladno7 Ledvice Počerady1 Počerady2 Počerady3 Počerady4 Počerady5 Prunéřov23 Prunéřov24 Prunéřov25 Tisová2 Tušimice21 Tušimice22 Tušimice23 Tušimice24)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}21          
{txt}Number of variables        {res}          22   {txt}->   {res}3           
{txt}j variable (21 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveChvaletice1 hourly_aveChvaletice2 ... hourly_aveTušimice24{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str12}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
Dětmarovice1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}(j = Dětmarovice1 Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice1 hourly_aveDětmarovice2 ... hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
Dětmarovice1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}(j = Dětmarovice1 Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice1 hourly_aveDětmarovice2 ... hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
Dětmarovice1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}(j = Dětmarovice1 Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice1 hourly_aveDětmarovice2 ... hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
Dětmarovice1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}(j = Dětmarovice1 Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice1 hourly_aveDětmarovice2 ... hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
Dětmarovice1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}{col 1}Dětmarovice1{col 16}Dětmarovice2{col 31}Dětmarovice3{col 46}Dětmarovice4
{res}{txt}(j = Dětmarovice1 Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice1 hourly_aveDětmarovice2 ... hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
{res}{txt}{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
{res}{txt}(j = Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice2 hourly_aveDětmarovice3 hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
{res}{txt}{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
{res}{txt}(j = Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice2 hourly_aveDětmarovice3 hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 169 obs)
(1 observation deleted)
{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
Dětmarovice2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Dětmarovice4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
{res}{txt}{col 1}Dětmarovice2{col 16}Dětmarovice3{col 31}Dětmarovice4
{res}{txt}(j = Dětmarovice2 Dětmarovice3 Dětmarovice4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveDětmarovice2 hourly_aveDětmarovice3 hourly_aveDětmarovice4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str13}, now {bf:str21} to accommodate using data's values)
{p_end}
{res}{text}(14 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Inkoo1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Inkoo2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
{res}{txt}{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
{res}{txt}(j = Hanasaari3 Hanasaari4 Inkoo1 Inkoo2 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}13          
{txt}Number of variables        {res}          14   {txt}->   {res}3           
{txt}j variable (13 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(14 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Inkoo1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Inkoo2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
{res}{txt}{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
{res}{txt}(j = Hanasaari3 Hanasaari4 Inkoo1 Inkoo2 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}13          
{txt}Number of variables        {res}          14   {txt}->   {res}3           
{txt}j variable (13 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(14 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Inkoo1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Inkoo2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
{res}{txt}{col 1}Hanasaari3{col 14}Inkoo1{col 27}Kristiina2{col 40}MeriPori1{col 53}Naantali2{col 66}Salmisaari{col 79}Vaskiluoto2
{col 1}Hanasaari4{col 14}Inkoo2{col 27}Kymijärvi1{col 40}Naantali1{col 53}Naantali3{col 66}Tahkoluoto1
{res}{txt}(j = Hanasaari3 Hanasaari4 Inkoo1 Inkoo2 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}13          
{txt}Number of variables        {res}          14   {txt}->   {res}3           
{txt}j variable (13 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(13 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}(j = Hanasaari3 Hanasaari4 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Naantali4 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}12          
{txt}Number of variables        {res}          13   {txt}->   {res}3           
{txt}j variable (12 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(13 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}double
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}(j = Hanasaari3 Hanasaari4 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Naantali4 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}12          
{txt}Number of variables        {res}          13   {txt}->   {res}3           
{txt}j variable (12 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(13 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}(j = Hanasaari3 Hanasaari4 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Naantali4 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}12          
{txt}Number of variables        {res}          13   {txt}->   {res}3           
{txt}j variable (12 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(13 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}(j = Hanasaari3 Hanasaari4 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Naantali4 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}12          
{txt}Number of variables        {res}          13   {txt}->   {res}3           
{txt}j variable (12 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(13 vars, 169 obs)
(1 observation deleted)
{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
Hanasaari3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Hanasaari4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kristiina2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kymijärvi1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}MeriPori1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Naantali2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Naantali3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Naantali4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Salmisaari: all characters numeric; {res}replaced {txt}as {res}double
{txt}Tahkoluoto1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Vaskiluoto2: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}{col 1}Hanasaari3{col 14}Kristiina2{col 27}MeriPori1{col 40}Naantali2{col 53}Naantali4{col 66}Tahkoluoto1
{col 1}Hanasaari4{col 14}Kymijärvi1{col 27}Naantali1{col 40}Naantali3{col 53}Salmisaari{col 66}Vaskiluoto2
{res}{txt}(j = Hanasaari3 Hanasaari4 Kristiina2 Kymijärvi1 MeriPori1 Naantali1 Naantali2 Naantali3 Naantali4 Salmisaari Tahkoluoto1 Vaskiluoto2)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}12          
{txt}Number of variables        {res}          13   {txt}->   {res}3           
{txt}j variable (12 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveHanasaari3 hourly_aveHanasaari4 ... hourly_aveVaskiluoto2{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str11}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(18 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3{col 71}Ptolemaida3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4{col 71}Ptolemaida4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida2
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ptolemaida2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Ptolemaida3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Ptolemaida4: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3{col 71}Ptolemaida3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4{col 71}Ptolemaida4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida2
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3{col 71}Ptolemaida3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4{col 71}Ptolemaida4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida2
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4 Ptolemaida2 Ptolemaida3 Ptolemaida4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}17          
{txt}Number of variables        {res}          18   {txt}->   {res}3           
{txt}j variable (17 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_avePtolemaida4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(18 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3{col 71}Ptolemaida3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4{col 71}Ptolemaida4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida2
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ptolemaida2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Ptolemaida3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Ptolemaida4: all characters numeric; {res}replaced {txt}as {res}byte
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3{col 71}Ptolemaida3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4{col 71}Ptolemaida4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida2
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3{col 71}Ptolemaida3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4{col 71}Ptolemaida4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida2
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4 Ptolemaida2 Ptolemaida3 Ptolemaida4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}17          
{txt}Number of variables        {res}          18   {txt}->   {res}3           
{txt}j variable (17 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_avePtolemaida4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(15 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}14          
{txt}Number of variables        {res}          15   {txt}->   {res}3           
{txt}j variable (14 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_aveMegalopolis4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(15 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}14          
{txt}Number of variables        {res}          15   {txt}->   {res}3           
{txt}j variable (14 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_aveMegalopolis4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(15 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}14          
{txt}Number of variables        {res}          15   {txt}->   {res}3           
{txt}j variable (14 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_aveMegalopolis4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(15 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}14          
{txt}Number of variables        {res}          15   {txt}->   {res}3           
{txt}j variable (14 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_aveMegalopolis4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(15 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~3{col 29}AgiosDimit~5{col 43}Amyntaio2{col 57}Kardia1{col 71}Kardia3{col 85}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~4{col 29}Amyntaio1{col 43}FlorinaMel~i{col 57}Kardia2{col 71}Kardia4{col 85}Megalopolis4
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}14          
{txt}Number of variables        {res}          15   {txt}->   {res}3           
{txt}j variable (14 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_aveMegalopolis4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(16 vars, 169 obs)
(1 observation deleted)
{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida5
AgiosDimitrios1: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios2: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios3: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios4: all characters numeric; {res}replaced {txt}as {res}double
{txt}AgiosDimitrios5: all characters numeric; {res}replaced {txt}as {res}double
{txt}Amyntaio1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Amyntaio2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}FlorinaMelíti: all characters numeric; {res}replaced {txt}as {res}double
{txt}Kardia1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kardia2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kardia3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Kardia4: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Megalopolis3: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Megalopolis4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Ptolemaida5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida5
{res}{txt}{col 1}AgiosDimit~1{col 15}AgiosDimit~4{col 29}Amyntaio2{col 43}Kardia2{col 57}Megalopolis3
{col 1}AgiosDimit~2{col 15}AgiosDimit~5{col 29}FlorinaMel~i{col 43}Kardia3{col 57}Megalopolis4
{col 1}AgiosDimit~3{col 15}Amyntaio1{col 29}Kardia1{col 43}Kardia4{col 57}Ptolemaida5
{res}{txt}(j = AgiosDimitrios1 AgiosDimitrios2 AgiosDimitrios3 AgiosDimitrios4 AgiosDimitrios5 Amyntaio1 Amyntaio2 FlorinaMelíti Kardia1 Kardia2 Kardia3 Kardia4 Megalopolis3 Megalopolis4 Ptolemaida5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}15          
{txt}Number of variables        {res}          16   {txt}->   {res}3           
{txt}j variable (15 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveAgiosDimitrios1 hourly_aveAgiosDimitrios2 ... hourly_avePtolemaida5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str15}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str6}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(4 vars, 673 obs)
(1 observation deleted)
{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
Mátra3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Mátra5: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}{col 1}Mátra3{col 10}Mátra4{col 19}Mátra5
{res}{txt}(j = Mátra3 Mátra4 Mátra5)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}3           
{txt}Number of variables        {res}           4   {txt}->   {res}3           
{txt}j variable (3 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveMátra3 hourly_aveMátra4 hourly_aveMátra5{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str7}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str7}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}FiumeSanto3{col 15}FiumeSanto4{col 29}Torrevalda~3{col 43}Torrevalda~4
FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FiumeSanto3{col 15}FiumeSanto4{col 29}Torrevalda~3{col 43}Torrevalda~4
{res}{txt}{col 1}FiumeSanto3{col 15}FiumeSanto4{col 29}Torrevalda~3{col 43}Torrevalda~4
{res}{txt}(j = FiumeSanto3 FiumeSanto4 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFiumeSanto3 hourly_aveFiumeSanto4 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(5 vars, 169 obs)
(1 observation deleted)
{col 1}FiumeSanto3{col 15}FiumeSanto4{col 29}Torrevalda~3{col 43}Torrevalda~4
FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FiumeSanto3{col 15}FiumeSanto4{col 29}Torrevalda~3{col 43}Torrevalda~4
{res}{txt}{col 1}FiumeSanto3{col 15}FiumeSanto4{col 29}Torrevalda~3{col 43}Torrevalda~4
{res}{txt}(j = FiumeSanto3 FiumeSanto4 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}4           
{txt}Number of variables        {res}           5   {txt}->   {res}3           
{txt}j variable (4 values)                     ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFiumeSanto3 hourly_aveFiumeSanto4 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 169 obs)
(1 observation deleted)
{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
FedericoII1: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII4: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina4: all characters numeric; {res}replaced {txt}as {res}double
{txt}LaSpezia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{res}{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{res}{txt}(j = FedericoII1 FedericoII2 FedericoII3 FedericoII4 FiumeSanto3 FiumeSanto4 Fusina1 Fusina2 Fusina3 Fusina4 LaSpezia3 Monfalcone1 Monfalcone2 Sulcis2 Sulcis3 TorrevaldaligaNord2 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}18          
{txt}Number of variables        {res}          19   {txt}->   {res}3           
{txt}j variable (18 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFedericoII1 hourly_aveFedericoII2 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(19 vars, 169 obs)
(1 observation deleted)
{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
FedericoII1: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII4: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina4: all characters numeric; {res}replaced {txt}as {res}double
{txt}LaSpezia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{res}{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{res}{txt}(j = FedericoII1 FedericoII2 FedericoII3 FedericoII4 FiumeSanto3 FiumeSanto4 Fusina1 Fusina2 Fusina3 Fusina4 LaSpezia3 Monfalcone1 Monfalcone2 Sulcis2 Sulcis3 TorrevaldaligaNord2 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}18          
{txt}Number of variables        {res}          19   {txt}->   {res}3           
{txt}j variable (18 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFedericoII1 hourly_aveFedericoII2 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(20 vars, 169 obs)
(1 observation deleted)
{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone1{col 71}Sulcis3{col 85}Torrevalda~4
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Lamarmora1{col 57}Sulcis2{col 71}Torrevalda~3
FedericoII1: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII2: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII4: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina4: all characters numeric; {res}replaced {txt}as {res}double
{txt}LaSpezia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Lamarmora1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone1{col 71}Sulcis3{col 85}Torrevalda~4
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Lamarmora1{col 57}Sulcis2{col 71}Torrevalda~3
{res}{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}Fusina1{col 43}Fusina4{col 57}Monfalcone1{col 71}Sulcis3{col 85}Torrevalda~4
{col 1}FedericoII2{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Monfalcone2{col 71}Torrevalda~2
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Lamarmora1{col 57}Sulcis2{col 71}Torrevalda~3
{res}{txt}(j = FedericoII1 FedericoII2 FedericoII3 FedericoII4 FiumeSanto3 FiumeSanto4 Fusina1 Fusina2 Fusina3 Fusina4 LaSpezia3 Lamarmora1 Monfalcone1 Monfalcone2 Sulcis2 Sulcis3 TorrevaldaligaNord2 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}19          
{txt}Number of variables        {res}          20   {txt}->   {res}3           
{txt}j variable (19 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFedericoII1 hourly_aveFedericoII2 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(18 vars, 169 obs)
(1 observation deleted)
{col 1}FedericoII1{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{col 1}FedericoII4{col 15}Fusina1{col 29}Fusina4{col 43}Monfalcone2{col 57}Torrevalda~2
FedericoII1: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII4: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina4: all characters numeric; {res}replaced {txt}as {res}double
{txt}LaSpezia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FedericoII1{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{col 1}FedericoII4{col 15}Fusina1{col 29}Fusina4{col 43}Monfalcone2{col 57}Torrevalda~2
{res}{txt}{col 1}FedericoII1{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{col 1}FedericoII4{col 15}Fusina1{col 29}Fusina4{col 43}Monfalcone2{col 57}Torrevalda~2
{res}{txt}(j = FedericoII1 FedericoII3 FedericoII4 FiumeSanto3 FiumeSanto4 Fusina1 Fusina2 Fusina3 Fusina4 LaSpezia3 Monfalcone1 Monfalcone2 Sulcis2 Sulcis3 TorrevaldaligaNord2 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}17          
{txt}Number of variables        {res}          18   {txt}->   {res}3           
{txt}j variable (17 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFedericoII1 hourly_aveFedericoII3 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(18 vars, 169 obs)
(1 observation deleted)
{col 1}FedericoII1{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{col 1}FedericoII4{col 15}Fusina1{col 29}Fusina4{col 43}Monfalcone2{col 57}Torrevalda~2
FedericoII1: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII4: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina1: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Fusina2: all characters numeric; {res}replaced {txt}as {res}byte
{txt}Fusina3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina4: all characters numeric; {res}replaced {txt}as {res}double
{txt}LaSpezia3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FedericoII1{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{col 1}FedericoII4{col 15}Fusina1{col 29}Fusina4{col 43}Monfalcone2{col 57}Torrevalda~2
{res}{txt}{col 1}FedericoII1{col 15}FiumeSanto3{col 29}Fusina2{col 43}LaSpezia3{col 57}Sulcis2{col 71}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto4{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis3{col 71}Torrevalda~4
{col 1}FedericoII4{col 15}Fusina1{col 29}Fusina4{col 43}Monfalcone2{col 57}Torrevalda~2
{res}{txt}(j = FedericoII1 FedericoII3 FedericoII4 FiumeSanto3 FiumeSanto4 Fusina1 Fusina2 Fusina3 Fusina4 LaSpezia3 Monfalcone1 Monfalcone2 Sulcis2 Sulcis3 TorrevaldaligaNord2 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}17          
{txt}Number of variables        {res}          18   {txt}->   {res}3           
{txt}j variable (17 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFedericoII1 hourly_aveFedericoII3 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}
{res}{text}(15 vars, 169 obs)
(1 observation deleted)
{col 1}FedericoII1{col 15}FedericoII4{col 29}FiumeSanto4{col 43}Fusina4{col 57}Monfalcone2{col 71}Sulcis3{col 85}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto3{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis2{col 71}Torrevalda~2{col 85}Torrevalda~4
FedericoII1: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FedericoII4: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto3: all characters numeric; {res}replaced {txt}as {res}double
{txt}FiumeSanto4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina3: all characters numeric; {res}replaced {txt}as {res}double
{txt}Fusina4: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone1: all characters numeric; {res}replaced {txt}as {res}double
{txt}Monfalcone2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis2: all characters numeric; {res}replaced {txt}as {res}double
{txt}Sulcis3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord2: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord3: all characters numeric; {res}replaced {txt}as {res}double
{txt}TorrevaldaligaNord4: all characters numeric; {res}replaced {txt}as {res}double
{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}FiumeSanto4{col 43}Fusina4{col 57}Monfalcone2{col 71}Sulcis3{col 85}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto3{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis2{col 71}Torrevalda~2{col 85}Torrevalda~4
{res}{txt}{col 1}FedericoII1{col 15}FedericoII4{col 29}FiumeSanto4{col 43}Fusina4{col 57}Monfalcone2{col 71}Sulcis3{col 85}Torrevalda~3
{col 1}FedericoII3{col 15}FiumeSanto3{col 29}Fusina3{col 43}Monfalcone1{col 57}Sulcis2{col 71}Torrevalda~2{col 85}Torrevalda~4
{res}{txt}(j = FedericoII1 FedericoII3 FedericoII4 FiumeSanto3 FiumeSanto4 Fusina3 Fusina4 Monfalcone1 Monfalcone2 Sulcis2 Sulcis3 TorrevaldaligaNord2 TorrevaldaligaNord3 TorrevaldaligaNord4)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}           1   {txt}->   {res}14          
{txt}Number of variables        {res}          15   {txt}->   {res}3           
{txt}j variable (14 values)                    ->   {res}facility_name
{txt}xij variables:
{res}hourly_aveFedericoII1 hourly_aveFedericoII3 ... hourly_aveTorrevaldaligaNord4{txt}->{res}hourly_ave
{txt}{hline 77}
{res}{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str19}, now {bf:str21} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:country} was {bf:str5}, now {bf:str14} to accommodate using data's values)
{p_end}

{com}. 
. drop if yearly_mhw == 0
{txt}(39 observations deleted)

{com}. 
. 
. 
. *Some Manual Matching
. replace facility_name = "Adamow" if facility_name == "Adamów"
{txt}(3 real changes made)

{com}. replace facility_name = "Agios Dimitrios" if facility_name == "AgiosDimitrios"
{txt}(8 real changes made)

{com}. replace facility_name = "Altbach/Deizisau" if facility_name == "AltbachDeizisau"
{txt}(8 real changes made)

{com}. replace facility_name = "Amintaio" if facility_name == "Amyntaio"
{txt}(6 real changes made)

{com}. replace facility_name = "Belchatow" if facility_name == "Belchatów"
{txt}(8 real changes made)

{com}. replace facility_name = "Chorzow 2" if facility_name == "Chorzów"
{txt}(8 real changes made)

{com}. replace facility_name = "Dolna Odra" if facility_name == "DolnaOdra"
{txt}(8 real changes made)

{com}. replace facility_name = "Duisburg-Walsum" if facility_name == "DuisburgWalsum"
{txt}(8 real changes made)

{com}. replace facility_name = "Duernrohr" if facility_name == "Dürnrohr"
{txt}(1 real change made)

{com}. replace facility_name = "Detmarovice" if facility_name == "Dětmarovice"
{txt}(8 real changes made)

{com}. replace facility_name = "Fiume Santo" if facility_name == "FiumeSanto"
{txt}(8 real changes made)

{com}. replace facility_name = "Frechen/Wachtberg" if facility_name == "FrechenWachtberg"
{txt}(2 real changes made)

{com}. replace facility_name = "Hanasaari B" if facility_name == "Hanasaari"
{txt}(8 real changes made)

{com}. replace facility_name = "Ibbenbueren" if facility_name == "Ibbenbüren"
{txt}(7 real changes made)

{com}. replace facility_name = "Karlsruhe" if facility_name == "KarlsruheR"
{txt}(8 real changes made)

{com}. replace facility_name = "Krakow" if facility_name == "KrakówLeg"
{txt}(8 real changes made)

{com}. replace facility_name = "La Maxe" if facility_name == "LaMaxe"
{txt}(1 real change made)

{com}. replace facility_name = "La Spezia" if facility_name == "LaSpezia"
{txt}(5 real changes made)

{com}. replace facility_name = "Luenen" if facility_name == "Lünen"
{txt}(8 real changes made)

{com}. replace facility_name = "Meri-Pori" if facility_name == "MeriPori"
{txt}(8 real changes made)

{com}. replace facility_name = "Naantali 1" if facility_name == "Naantali"
{txt}(8 real changes made)

{com}. replace facility_name = "Niederaussem" if facility_name == "Niederaußem"
{txt}(8 real changes made)

{com}. replace facility_name = "Prunerov" if facility_name == "Prunéřov"
{txt}(8 real changes made)

{com}. replace facility_name = "Schwarze Pumpe" if facility_name == "SchwarzePumpe"
{txt}(8 real changes made)

{com}. replace facility_name = "Stalowa Wola" if facility_name == "StalowaWolaPasywna"
{txt}(7 real changes made)

{com}. replace facility_name = "Sulcis Power Station" if facility_name == "Sulcis"
{txt}(6 real changes made)

{com}. replace facility_name = "Torrevaldaliga Nord" if facility_name == "TorrevaldaligaNord"
{txt}(8 real changes made)

{com}. replace facility_name = "Turow" if facility_name == "Turów"
{txt}(8 real changes made)

{com}. replace facility_name = "Tusimice" if facility_name == "Tušimice"
{txt}(8 real changes made)

{com}. replace facility_name = "Vaskiluoto 2" if facility_name == "Vaskiluoto"
{txt}(8 real changes made)

{com}. replace facility_name = "Vitry" if facility_name == "VitrysurSeine"
{txt}(1 real change made)

{com}. 
. save "../Intermediate/ENTSO-E", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/ENTSO-E.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/ENTSO-E.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. **********************************************************************
. ** Europe Beyond Coal
. **********************************************************************
. import excel "../Raw/EuroPlantEmission/2022-10-20-Europe_Beyond_Coal-European_Coal_Database.xlsx", sheet("Plant") cellrange(A1:AH1593) firstrow clear
{res}{text}(34 vars, 1,592 obs)

{com}. drop if missing(EBCplantID)
{txt}(1,096 observations deleted)

{com}. order EBCplantID Plantname Owner
{txt}
{com}. sort Owner
{txt}
{com}. 
. 
. replace Owner="Albioma SA" if Owner=="Albioma"
{txt}(3 real changes made)

{com}. replace Owner="CEZ AS" if Owner=="CEZ"
{txt}(13 real changes made)

{com}. replace Owner="Electricite de France SA (EDF Group)" if Owner=="EDF"
{txt}(9 real changes made)

{com}. replace Owner="EnBW Energie Baden-Württemberg AG" if Owner=="EnBW"
{txt}(8 real changes made)

{com}. replace Owner="Enea SA" if Owner=="Enea"
{txt}(4 real changes made)

{com}. replace Owner="Enel SpA" if Owner=="Enel"
{txt}(8 real changes made)

{com}. replace Owner="Energa SA" if Owner=="Energa"
{txt}(3 real changes made)

{com}. replace Owner="Energeticky a prumyslovy holding a.s. (EPH)" if Owner=="EPH"
{txt}(19 real changes made)

{com}. replace Owner="EVN AG" if Owner=="EVN"
{txt}(1 real change made)

{com}. replace Owner="Fortum Oyj" if Owner=="Fortum"
{txt}(9 real changes made)

{com}. replace Owner="PGE SA (Polska Grupa Energetyczna SA)" if Owner=="PGE"
{txt}(15 real changes made)

{com}. replace Owner="Polskie Górnictwo Naftowe i Gazownictwo SA (PGNiG)" if Owner=="PGNiG"
{txt}(2 real changes made)

{com}. replace Owner="Public Power Corporation SA (PPC)" if Owner=="PPC"
{txt}(10 real changes made)

{com}. replace Owner="ContourGlobal plc" if Owner=="ContourGlobal"
{txt}(2 real changes made)

{com}. replace Owner="RWE AG" if Owner=="RWE"
{txt}(19 real changes made)

{com}. replace Owner="Sev.en Energy Group" if Owner=="Sev.en Energy AG"
{txt}(4 real changes made)

{com}. replace Owner="STEAG GmbH" if Owner=="Steag"
{txt}(10 real changes made)

{com}. replace Owner="TAURON Polska Energia S.A" if Owner=="Tauron"
{txt}(11 real changes made)

{com}. replace Owner="ZE PAK SA Group (Zespół Elektrowni Pątnów Adamów Konin SA)" if Owner=="ZEPAK"
{txt}(4 real changes made)

{com}. replace Owner="Elektrocieplownia Bedzin SA" if Owner=="EC Będzin SA"
{txt}(1 real change made)

{com}. replace Owner="Helen Ltd" if Owner=="Helen"
{txt}(2 real changes made)

{com}. replace Owner="EFT Rudnik i Termoelektrana Stanari d.o.o" if Owner=="EFT"
{txt}(1 real change made)

{com}. replace Owner="Magyar Villamos Művek Zrt (MVM)" if Owner=="MVM"
{txt}(2 real changes made)

{com}. 
. reshape long co2_, i(EBCplantID) j(year)  
{txt}(j = 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021)

Data{col 36}Wide{col 43}->{col 48}Long
{hline 77}
Number of observations     {res}         496   {txt}->   {res}8,432       
{txt}Number of variables        {res}          34   {txt}->   {res}19          
{txt}j variable (17 values)                    ->   {res}year
{txt}xij variables:
         {res}co2_2005 co2_2006 ... co2_2021   {txt}->   {res}co2_
{txt}{hline 77}

{com}. ren (co2_ Plantname Owner) (co2_emission facility_name plant_company)
{res}{txt}
{com}. keep co2_emission facility_name plant_company year
{txt}
{com}. 
. tempfile plant_emission_EU
{txt}
{com}. save `plant_emission_EU'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001k{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. 
. use "../Intermediate/analysis_panel_firmyear.dta", clear
{txt}
{com}. keep if Continent=="Europe"
{txt}(4,823 observations deleted)

{com}. ren borrower_name plant_company
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. drop if missing(plant_company)
{txt}(0 observations deleted)

{com}. tempfile firm_year_main
{txt}
{com}. save `firm_year_main'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001l{rm}
saved
as .dta format
{p_end}

{com}. use `plant_emission_EU', clear
{txt}
{com}. joinby plant_company year using `firm_year_main'
{txt}
{com}. 
. 
. merge 1:1 facility_name year using "../Intermediate/ENTSO-E"
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           2,184
{txt}{col 9}from master{col 30}{res}           1,808{txt}  (_merge==1)
{col 9}from using{col 30}{res}             376{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             402{txt}  (_merge==3)
{col 5}{hline 41}

{com}. keep facility_name _merge
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(2,248 observations deleted)

{com}. sort facility_name
{txt}
{com}. 
. compress
  {txt}variable {bf}{res}facility_name{sf}{txt} was {bf}{res}str43{sf}{txt} now {bf}{res}str28{sf}
{txt}  (5,070 bytes saved)

{com}. tempfile EU_plant_merged
{txt}
{com}. save `EU_plant_merged'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001m{rm}
saved
as .dta format
{p_end}

{com}. 
. **********************************************************************
. ** Australia plants
. **
. ********************************************************************
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information by designated generation facility 2020-21.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(14 vars, 655 obs)

{com}. keep if strpos(Primaryfuel, "Coal")
{txt}(618 observations deleted)

{com}. ren (Reportingentity Facilityname TotalemissionstCO2e ElectricityproductionMWh) (plant_company facility_name co2_emission electric_prod_MWh)
{res}{txt}
{com}. gen year=2020
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2020
{txt}
{com}. save `aus2020'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001n{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information by designated generation facility 2019-20.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(14 vars, 621 obs)

{com}. keep if strpos(Primaryfuel, "Coal")
{txt}(584 observations deleted)

{com}. ren (Reportingentity Facilityname TotalemissionstCO2e ElectricityproductionMWh) (plant_company facility_name co2_emission electric_prod_MWh)
{res}{txt}
{com}. gen year=2019
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2019
{txt}
{com}. save `aus2019'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001o{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information for designated generation facilities 2018-19.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(14 vars, 583 obs)

{com}. keep if strpos(PrimaryFuel, "Coal")
{txt}(545 observations deleted)

{com}. ren (ReportingEntity FacilityName TotalEmissionstCO2e ElectricityProductionMWh) (plant_company facility_name co2_emission electric_prod_MWh)
{res}{txt}
{com}. gen year=2018
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2018
{txt}
{com}. save `aus2018'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001p{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information for designated generation facilities 2017-18.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(14 vars, 522 obs)

{com}. keep if strpos(PrimaryFuel, "Coal")
{txt}(485 observations deleted)

{com}. ren (ReportingEntity FacilityName TotalEmissionstCO2e ElectricityProductionMWh) (plant_company facility_name co2_emission electric_prod_MWh)
{res}{txt}
{com}. gen year=2017
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2017
{txt}
{com}. save `aus2017'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001q{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information for designated generation facilities 2016-17.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(14 vars, 486 obs)

{com}. keep if strpos(PrimaryFuel, "Coal")
{txt}(450 observations deleted)

{com}. ren (ReportingEntity FacilityName TotalEmissionstCO2e ElectricityProductionMwh) (plant_company facility_name co2_emission electric_prod_MWh)
{res}{txt}
{com}. gen year=2016
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2016
{txt}
{com}. save `aus2016'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001r{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information for designated generation facilities 2015-16.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(14 vars, 482 obs)

{com}. keep if strpos(PrimaryFuel, "Coal")
{txt}(447 observations deleted)

{com}. ren (Controllingcorporation FacilityName TotalEmissionstCO2e ElectricityProductionMwh) (plant_company facility_name co2_emission electric_prod_MWh)
{res}{txt}
{com}. gen year=2015
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2015
{txt}
{com}. save `aus2015'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001s{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information for designated generation facilities 2014-15.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(14 vars, 424 obs)

{com}. keep if strpos(PrimaryFuel, "Coal")
{txt}(384 observations deleted)

{com}. ren (ReportingEntity FacilityName TotalEmissionstCO2e ElectricityProductionMwh) (plant_company facility_name co2_emission electric_prod_MWh)
{res}{txt}
{com}. gen year=2014
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2014
{txt}
{com}. save `aus2014'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001t{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information for designated generation facilities 2013-14.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(8 vars, 422 obs)

{com}. destring GreenhouseGasEmissionsTotalE,replace
{txt}GreenhouseGasEmissionsTotalE already numeric; no {res}replace
{txt}
{com}. ren (ReportingEntity FacilityName GreenhouseGasEmissionsTotalE) (plant_company facility_name co2_emission)
{res}{txt}
{com}. gen year=2013
{txt}
{com}. gen electric_prod_MWh = ElectricityProductionGJ*0.2777777
{txt}(2 missing values generated)

{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2013
{txt}
{com}. save `aus2013'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001u{rm}
saved
as .dta format
{p_end}

{com}. 
. import excel "../Raw/AusPlantEmission/Greenhouse and energy information for designated generation facilities 2012-13.xlsx", sheet("Greenhouse and energy informati") firstrow clear
{res}{text}(8 vars, 382 obs)

{com}. ren (ReportingEntity FacilityName TotalEmissionstCO2e) (plant_company facility_name co2_emission)
{res}{txt}
{com}. gen year=2012
{txt}
{com}. gen electric_prod_MWh = ElectricityProductionGJ*0.2777777
{txt}
{com}. keep co2_emission facility_name plant_company year electric_prod_MWh
{txt}
{com}. tempfile aus2012
{txt}
{com}. save `aus2012'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001v{rm}
saved
as .dta format
{p_end}

{com}. 
. use `aus2012', clear 
{txt}
{com}. append using `aus2013'
{txt}
{com}. append using `aus2014'
{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str47}, now {bf:str48} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:electric_prod_MWh} was {bf:float}, now {bf:double} to accommodate using data's values)
{p_end}

{com}. append using `aus2015'
{txt}{p 0 7 2}
(variable
{bf:plant_company} was {bf:str51}, now {bf:str100} to accommodate using data's values)
{p_end}

{com}. append using `aus2016'
{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str48}, now {bf:str71} to accommodate using data's values)
{p_end}

{com}. append using `aus2017'
{txt}
{com}. append using `aus2018'
{txt}
{com}. append using `aus2019'
{txt}{p 0 7 2}
(variable
{bf:facility_name} was {bf:str71}, now {bf:str77} to accommodate using data's values)
{p_end}

{com}. append using `aus2020'
{txt}
{com}. 
. 
. collapse (sum) co2_emission aus_electric_prod_MWh = electric_prod_MWh (first) plant_company, by(facility_name year)
{res}{txt}
{com}. bysort facility_name: gen N=_N
{txt}
{com}. drop if N==1 
{txt}(42 observations deleted)

{com}. drop if N==2 & year==2012
{txt}(273 observations deleted)

{com}. bysort facility_name: gen NN=_N
{txt}
{com}. drop if NN==1
{txt}(273 observations deleted)

{com}. drop N NN
{txt}
{com}. 
. 
. 
. 
. replace plant_company="AGL Energy Ltd" if plant_company=="AGL ENERGY LIMITED"
{txt}(25 real changes made)

{com}. replace plant_company="BHP Group Ltd" if plant_company=="BHP BILLITON IRON ORE PTY. LTD."
{txt}(0 real changes made)

{com}. replace plant_company="BHP Group Ltd" if plant_company=="BHP Billiton Limited"
{txt}(0 real changes made)

{com}. replace plant_company="BHP Group Ltd" if plant_company=="BHP GROUP LIMITED"
{txt}(0 real changes made)

{com}. replace plant_company="CS Energy Ltd" if plant_company=="C S ENERGY LIMITED"
{txt}(23 real changes made)

{com}. replace plant_company="Origin Energy Ltd" if plant_company=="ORIGIN ENERGY LIMITED"
{txt}(7 real changes made)

{com}. replace plant_company="Stanwell Corporation Ltd" if plant_company=="Stanwell Corporation Limited"
{txt}(2 real changes made)

{com}. replace plant_company="Stanwell Corporation Ltd" if plant_company=="STANWELL CORPORATION LIMITED"
{txt}(16 real changes made)

{com}. replace plant_company="Sunset Power International Pty Ltd (Delta Electricity)" if plant_company=="SUNSET POWER INTERNATIONAL PTY LTD"
{txt}(2 real changes made)

{com}. replace plant_company="Sunset Power International Pty Ltd (Delta Electricity)" if plant_company=="DELTA ELECTRICITY"
{txt}(6 real changes made)

{com}. replace plant_company="Sunset Power International Pty Ltd (Delta Electricity)" if plant_company=="DELTA ELECTRICITY PTY LTD"
{txt}(2 real changes made)

{com}. replace plant_company="Bluewaters Power 1 Pty Ltd" if plant_company=="BLUEWATERS POWER 1 PTY LTD"
{txt}(8 real changes made)

{com}. 
. tempfile plant_emission_AUS
{txt}
{com}. save `plant_emission_AUS'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001w{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. **********************************************************************
. * Merge with main dataset
. **********************************************************************
.   
. **clean dataset to merge with
. use "../Intermediate/analysis_panel_firmyear.dta", clear
{txt}
{com}. keep if Country=="USA"
{txt}(4,576 observations deleted)

{com}. ren Company_orbis plant_company
{res}{txt}
{com}. replace plant_company = subinstr(plant_company, ".", "",.) 
{txt}(169 real changes made)

{com}. replace plant_company = subinstr(plant_company, ",", "",.) 
{txt}(117 real changes made)

{com}. replace plant_company = strtrim(plant_company)
{txt}(0 real changes made)

{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. drop if missing(plant_company)
{txt}(26 observations deleted)

{com}. tempfile firm_year_main
{txt}
{com}. save `firm_year_main'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00001x{rm}
saved
as .dta format
{p_end}

{com}. 
. use `plant_emission_US', clear
{txt}
{com}. joinby plant_company year using `firm_year_main'
{txt}
{com}. drop if facility_name == "Monongalia County Preparation Plant" //dropping this plant to make unique at plant year level
{txt}(20 observations deleted)

{com}. merge 1:1 facility_name year using "../Intermediate/EIA_923_forms", nogen keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             401
{txt}{col 9}from master{col 30}{res}             401{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}           1,669{txt}  
{col 5}{hline 41}

{com}. compress
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}dt_term{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_trans_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_tranche_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_investors_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}orig_equity_ijg{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}orig_equity{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_all{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equitypanel{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}ExpansionPlansCoalPowerTot{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion_infrastructure{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion_mining{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion_power{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_power{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_services{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_mining{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_ds_matches{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_ijg_matches{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_public{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_orbis{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}borrow{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}post15{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}cont{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}continent_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}region_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}count{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}country_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}period_pre{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}fb{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}pos_debt{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}highshare{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}co2_emission{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}long{sf}
  {txt}variable {bf}{res}ExpansionPlansCoalPowerPro{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}facility_name{sf}{txt} was {bf}{res}str65{sf}{txt} now {bf}{res}str48{sf}
  {txt}variable {bf}{res}plant_company{sf}{txt} was {bf}{res}str355{sf}{txt} now {bf}{res}str53{sf}
  {txt}variable {bf}{res}borrower_name{sf}{txt} was {bf}{res}str77{sf}{txt} now {bf}{res}str53{sf}
  {txt}variable {bf}{res}Country{sf}{txt} was {bf}{res}str24{sf}{txt} now {bf}{res}str3{sf}
  {txt}variable {bf}{res}Continent{sf}{txt} was {bf}{res}str15{sf}{txt} now {bf}{res}str13{sf}
  {txt}variable {bf}{res}Region{sf}{txt} was {bf}{res}str23{sf}{txt} now {bf}{res}str13{sf}
  {txt}variable {bf}{res}BvDIDnumber{sf}{txt} was {bf}{res}str17{sf}{txt} now {bf}{res}str12{sf}
{txt}  (1,012,230 bytes saved)

{com}. tempfile US_plant_merged
{txt}
{com}. save `US_plant_merged'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000020{rm}
saved
as .dta format
{p_end}

{com}. 
. ** EU and AUS company are based on borrower name
. use "../Intermediate/analysis_panel_firmyear.dta", clear
{txt}
{com}. keep if Continent=="Europe"
{txt}(4,823 observations deleted)

{com}. ren borrower_name plant_company
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. drop if missing(plant_company)
{txt}(0 observations deleted)

{com}. tempfile firm_year_main
{txt}
{com}. save `firm_year_main'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000021{rm}
saved
as .dta format
{p_end}

{com}. use `plant_emission_EU', clear
{txt}
{com}. joinby plant_company year using `firm_year_main'
{txt}
{com}. 
. merge 1:1 facility_name year using "../Intermediate/ENTSO-E", nogen keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           1,808
{txt}{col 9}from master{col 30}{res}           1,808{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             402{txt}  
{col 5}{hline 41}

{com}. compress
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}equity_n_trans_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_tranche_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_investors_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}orig_equity_ijg{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}orig_equity{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_all{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equitypanel{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}ExpansionPlansCoalPowerTot{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}expansion_infrastructure{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion_mining{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion_power{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_power{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_services{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_mining{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_ds_matches{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_ijg_matches{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_public{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_orbis{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}log_debt_private_non_bank{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}logim_debt_private_non_bank{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}borrow{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}post15{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}cont{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}continent_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}region_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}count{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}country_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}period_pre{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}fb{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}pos_debt{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}highshare{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}borr_debt_private_non_bank{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}ExpansionPlansCoalPowerPro{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}facility_name{sf}{txt} was {bf}{res}str43{sf}{txt} now {bf}{res}str28{sf}
  {txt}variable {bf}{res}plant_company{sf}{txt} was {bf}{res}str77{sf}{txt} now {bf}{res}str63{sf}
  {txt}variable {bf}{res}Country{sf}{txt} was {bf}{res}str24{sf}{txt} now {bf}{res}str22{sf}
  {txt}variable {bf}{res}Continent{sf}{txt} was {bf}{res}str15{sf}{txt} now {bf}{res}str6{sf}
  {txt}variable {bf}{res}Region{sf}{txt} was {bf}{res}str23{sf}{txt} now {bf}{res}str13{sf}
  {txt}variable {bf}{res}BvDIDnumber{sf}{txt} was {bf}{res}str17{sf}{txt} now {bf}{res}str15{sf}
  {txt}variable {bf}{res}Company_orbis{sf}{txt} was {bf}{res}str87{sf}{txt} now {bf}{res}str59{sf}
  {txt}variable {bf}{res}region{sf}{txt} was {bf}{res}str13{sf}{txt} now {bf}{res}str6{sf}
{txt}  (439,790 bytes saved)

{com}. tempfile EU_plant_merged
{txt}
{com}. save `EU_plant_merged'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000022{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Intermediate/analysis_panel_firmyear.dta", clear
{txt}
{com}. keep if Country=="Australia"
{txt}(5,096 observations deleted)

{com}. ren borrower_name plant_company
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. drop if missing(plant_company)
{txt}(0 observations deleted)

{com}. tempfile firm_year_main
{txt}
{com}. save `firm_year_main'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000023{rm}
saved
as .dta format
{p_end}

{com}. use `plant_emission_AUS', clear
{txt}
{com}. joinby plant_company year using `firm_year_main'
{txt}
{com}. compress
  {txt}variable {bf}{res}year{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}borrower_id{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}dt_bridge{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}dt_cp{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}dt_loc{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}dt_mtn{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}dt_term{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}dt_allbonds{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coupon_bps{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_trans_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_tranche_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_investors_ijg{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}orig_equity_ijg{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}orig_equity{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_n_all{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equitypanel{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}ExpansionPlansCoalPowerTot{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}expansion_infrastructure{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion_mining{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion_power{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_power{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_services{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}coal_industry_mining{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_ds_matches{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_ijg_matches{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}is_public{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}has_orbis{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}log_debt_private_non_bank{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}logim_debt_private_non_bank{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}borrow{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}post15{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}cont{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}continent_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}region_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}count{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}country_i{sf}{txt} was {bf}{res}long{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}expansion{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}period_pre{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}fb{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}pos_debt{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}highshare{sf}{txt} was {bf}{res}float{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}co2_emission{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}long{sf}
  {txt}variable {bf}{res}borr_debt_private_non_bank{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}byte{sf}
  {txt}variable {bf}{res}equity_amt_public{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}long{sf}
  {txt}variable {bf}{res}ExpansionPlansCoalPowerPro{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}InstalledCoalPowerCapacity{sf}{txt} was {bf}{res}double{sf}{txt} now {bf}{res}int{sf}
  {txt}variable {bf}{res}facility_name{sf}{txt} was {bf}{res}str77{sf}{txt} now {bf}{res}str31{sf}
  {txt}variable {bf}{res}plant_company{sf}{txt} was {bf}{res}str100{sf}{txt} now {bf}{res}str54{sf}
  {txt}variable {bf}{res}Country{sf}{txt} was {bf}{res}str24{sf}{txt} now {bf}{res}str9{sf}
  {txt}variable {bf}{res}Continent{sf}{txt} was {bf}{res}str15{sf}{txt} now {bf}{res}str11{sf}
  {txt}variable {bf}{res}BvDIDnumber{sf}{txt} was {bf}{res}str17{sf}{txt} now {bf}{res}str11{sf}
  {txt}variable {bf}{res}Company_orbis{sf}{txt} was {bf}{res}str87{sf}{txt} now {bf}{res}str34{sf}
  {txt}variable {bf}{res}region{sf}{txt} was {bf}{res}str13{sf}{txt} now {bf}{res}str5{sf}
{txt}  (29,900 bytes saved)

{com}. tempfile AUS_plant_merged
{txt}
{com}. save `AUS_plant_merged'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000024{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use `US_plant_merged', clear
{txt}
{com}. append using `EU_plant_merged'
{txt}{p 0 7 2}
(variable
{bf:plant_company} was {bf:str53}, now {bf:str63} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:dt_term} was {bf:byte}, now {bf:float} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:Country} was {bf:str3}, now {bf:str22} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:ExpansionPlansCoalPowerPro} was {bf:byte}, now {bf:int} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:ExpansionPlansCoalPowerTot} was {bf:byte}, now {bf:int} to accommodate using data's values)
{p_end}
{p 0 7 2}
(variable
{bf:BvDIDnumber} was {bf:str12}, now {bf:str15} to accommodate using data's values)
{p_end}
(label {bf:{txt}medcoal} already defined)
(label {bf:{txt}medassets} already defined)
(label {bf:{txt}country_i} already defined)
(label {bf:{txt}count} already defined)
(label {bf:{txt}region_i} already defined)
(label {bf:{txt}continent_i} already defined)
(label {bf:{txt}cont} already defined)

{com}. append using `AUS_plant_merged'
{txt}{p 0 7 2}
(variable
{bf:Region} was {bf:str13}, now {bf:str23} to accommodate using data's values)
{p_end}
(label {bf:{txt}cont} already defined)
(label {bf:{txt}continent_i} already defined)
(label {bf:{txt}region_i} already defined)
(label {bf:{txt}count} already defined)
(label {bf:{txt}country_i} already defined)
(label {bf:{txt}medassets} already defined)
(label {bf:{txt}medcoal} already defined)

{com}. 
. 
. gen electric_prod_MWh = aus_electric_prod_MWh
{txt}(4,280 missing values generated)

{com}. replace electric_prod_MWh = NetGenerationMegawatthours if Country == "USA"
{txt}(1,669 real changes made)

{com}. replace electric_prod_MWh = yearly_mhw if missing(electric_prod_MWh)
{txt}(402 real changes made)

{com}. 
. 
. save ../Intermediate/plant_emission_data, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/plant_emission_data.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/plant_emission_data.dta{rm}
saved
{p_end}

{com}. 
. 
. 
. **********************************************************************
. ** PREPARE FOR REGRESSIONS
. ********************************************************************
. use ../Intermediate/plant_emission_data, clear 
{txt}
{com}. 
. 
. bys facility_name: gen cx = _n == 1
{txt}
{com}. sum ss_pre_all_debt_ban_intnstyn1_mx if cx == 1, de

              {txt}ss_pre_all_debt_ban_intnstyn1_mx
{hline 61}
      Percentiles      Smallest
 1%    {res}        0              0
{txt} 5%    {res}        0              0
{txt}10%    {res}        0              0       {txt}Obs         {res}        391
{txt}25%    {res} .2207666              0       {txt}Sum of wgt. {res}        391

{txt}50%    {res} .3887938                      {txt}Mean          {res} .3388744
                        {txt}Largest       Std. dev.     {res} .2125154
{txt}75%    {res} .5357355         .61202
{txt}90%    {res} .5655581         .61202       {txt}Variance      {res} .0451628
{txt}95%    {res}   .61202       .6558269       {txt}Skewness      {res}-.5564429
{txt}99%    {res}   .61202       .6558269       {txt}Kurtosis      {res} 1.973627
{txt}
{com}. gen ban_intensity_max_sd = ss_pre_all_debt_ban_intnstyn1_mx/`r(sd)'
{txt}
{com}. 
. replace electric_prod_MWh = 0 if electric_prod_MWh < 0
{txt}(38 real changes made)

{com}. gen co2_intensity = co2_emission/electric_prod_MWh
{txt}(2,399 missing values generated)

{com}. winsor co2_intensity, p(.01) gen(co2_intensity_win)
{txt}
{com}. 
. 
. egen newid = group(facility_name borrower_id)
{txt}
{com}. tsset newid year
{res}
{col 1}{txt:Panel variable: }{res:newid}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:2009}}{txt: to }{res:{bind:2021}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. 
. replace co2_emission=0 if missing(co2_emission)
{txt}(873 real changes made)

{com}. gen active=(co2_emission!=0)
{txt}
{com}. 
. 
. gen co2_emission_2014 = co2_emission if year == 2014
{txt}(3,986 missing values generated)

{com}. bys newid (co2_emission_2014): replace co2_emission_2014 = co2_emission_2014[1]
{txt}(3961 real changes made)

{com}. 
. 
. gen co2_scaled = co2_emission/co2_emission_2014
{txt}(679 missing values generated)

{com}. replace co2_scaled = . if co2_scaled > 4.2
{txt}(38 real changes made, 38 to missing)

{com}. 
. 
. gen treatment_2015 = (year>=2015)*ban_intensity_max_sd
{txt}
{com}. label var treatment_2015 "$\text{c -(}Bank Exit Exposure (Max){c )-}_{c -(}f{c )-}$ $\times$ $\mathds{c -(}1{c )-}\{c -(}Year \geq 2015\{c )-}$ "
{txt}
{com}. 
. 
. gen tag=1 if year==2014 & co2_emission==0
{txt}(4,315 missing values generated)

{com}. bys facility_name: egen toto=max(tag)
{txt}(3,718 missing values generated)

{com}. keep if toto == .
{txt}(654 observations deleted)

{com}. 
. save "../Intermediate/Coal_Plant_Emissions", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/Coal_Plant_Emissions.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/Coal_Plant_Emissions.dta{rm}
saved
{p_end}

{com}. 
. 
. {txt}
{com}. 
. ** BUILD BANK LEVEL COAL PORTFOLIOS DATA
. include "../Data_Cleaning/Build_Bank_Lending_Panel.do"
{txt}
{com}. //build panel structure. bank x year
. clear 
{txt}
{com}. set obs 16
{txt}{p}
Number of observations ({bf:_N}) was 0,
now 16.
{p_end}

{com}. gen year = _n+2005
{txt}
{com}. tempfile years 
{txt}
{com}. save `years'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000025{rm}
saved
as .dta format
{p_end}

{com}. 
. use ../Intermediate/bank_ban_strength_yearly, clear
{txt}
{com}. keep BankID 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(286,545 observations deleted)

{com}. cross using `years'
{txt}
{com}. merge 1:1 BankID year using ../Intermediate/bank_ban_strength_yearly, keep(1 3) nogen   //extract bank ban policies from 2006 to 2021
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          40,935
{txt}{col 9}from master{col 30}{res}          40,935{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}         177,385{txt}  
{col 5}{hline 41}

{com}. 
. 
. egen hcp = max(has_coded_policy), by(BankID) //considering the missing years from 2006-2015
{txt}
{com}. drop has_coded_policy
{txt}
{com}. rename hcp has_coded_policy
{res}{txt}
{com}. egen fby = max(first_ban_year), by(BankID)
{txt}(217,120 missing values generated)

{com}. drop first_ban_year
{txt}
{com}. rename fby first_ban_year
{res}{txt}
{com}. 
. replace active_policy = 0 if missing(active_policy)
{txt}(40,935 real changes made)

{com}. replace ban_intensity = 0 if missing(ban_intensity) 
{txt}(217,332 real changes made)

{com}. replace ban_intensity_new1 = 0 if missing(ban_intensity_new1) 
{txt}(217,332 real changes made)

{com}. 
. tempfile bankyear 
{txt}
{com}. save `bankyear'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000026{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. * Get underlying transaction data 
. use ../Intermediate/transaction_clean, clear
{txt}
{com}. //merge in the lenders for each instrument
. joinby transaction_id using ../Intermediate/transaction_lender_clean
{txt}
{com}. //merge in borrower info
. merge m:1 borrower_id using ../Intermediate/borrower_chars, keep(1 3) nogen keepusing(Country Continent)
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           2,649
{txt}{col 9}from master{col 30}{res}           2,649{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          65,591{txt}  
{col 5}{hline 41}

{com}. 
. gen year = yofd(date_trans)
{txt}
{com}. drop if amount_trans_usdm <= 0 | missing(amount_trans_usdm) | amount_trans_lender_usdm < 0
{txt}(1,578 observations deleted)

{com}. drop if missing(date_trans)
{txt}(0 observations deleted)

{com}. //collapse to bank year
. 
. gen debt = amount_trans_lender_usdm*(obs_ammendment==0)
{txt}(184 missing values generated)

{com}. gen loan = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==0)
{txt}(184 missing values generated)

{com}. gen bond = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==1)
{txt}(184 missing values generated)

{com}. 
. gen debt_nc = amount_trans_lender_usdm*(obs_ammendment==0)*(Country~="China")
{txt}(184 missing values generated)

{com}. gen loan_nc = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==0)*(Country~="China")
{txt}(184 missing values generated)

{com}. gen bond_nc = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==1)*(Country~="China")
{txt}(184 missing values generated)

{com}. 
. gen debt_wa = amount_trans_lender_usdm
{txt}(184 missing values generated)

{com}. gen loan_wa = amount_trans_lender_usdm*(bond_ind==0)
{txt}(184 missing values generated)

{com}. gen bond_wa = amount_trans_lender_usdm*(bond_ind==1)
{txt}(184 missing values generated)

{com}. 
. 
. gen debt_na = amount_trans_lender_usdm*(obs_ammendment==0)*(Continent=="North America")
{txt}(184 missing values generated)

{com}. gen loan_na = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==0)*(Continent=="North America")
{txt}(184 missing values generated)

{com}. gen bond_na = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==1)*(Continent=="North America")
{txt}(184 missing values generated)

{com}. 
. gen debt_eur = amount_trans_lender_usdm*(obs_ammendment==0)*(Continent=="Europe")
{txt}(184 missing values generated)

{com}. gen loan_eur = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==0)*(Continent=="Europe")
{txt}(184 missing values generated)

{com}. gen bond_eur = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==1)*(Continent=="Europe")
{txt}(184 missing values generated)

{com}. 
. 
. gen debt_asia = amount_trans_lender_usdm*(obs_ammendment==0)*(Continent=="Asia")
{txt}(184 missing values generated)

{com}. gen loan_asia = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==0)*(Continent=="Asia")
{txt}(184 missing values generated)

{com}. gen bond_asia = amount_trans_lender_usdm*(obs_ammendment==0)*(bond_ind==1)*(Continent=="Asia")
{txt}(184 missing values generated)

{com}. 
. 
. 
. collapse (sum) debt loan bond debt_nc loan_nc bond_nc debt_na loan_na bond_na debt_eur loan_eur bond_eur debt_asia loan_asia bond_asia *_wa, by(BankID year)
{res}{txt}
{com}. 
. merge 1:1 BankID year using `bankyear', keep(2 3) 
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         212,951
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}         212,951{txt}  (_merge==2)

{col 5}Matched{col 30}{res}           5,369{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen no_lending_bank_year = _merge == 2
{txt}
{com}. drop _merge
{txt}
{com}. 
. foreach var of var debt loan bond debt_nc loan_nc bond_nc debt_* bond_* loan_* {c -(}
{txt}  2{com}.         replace `var' = 0 if no_lending_bank_year == 1
{txt}  3{com}. {c )-}  
{txt}(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(0 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(0 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(0 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)
(212,951 real changes made)

{com}. 
. 
. 
. //look at total coal volume by bank
. egen total_coal_vol = sum(debt), by(BankID)
{txt}
{com}. egen ban_intensity_max = max(ban_intensity), by(BankID)
{txt}
{com}. egen ban_intensity_initial_max = max(ban_intensity_initial), by(BankID)
{txt}(217,104 missing values generated)

{com}. egen ban_intensity_new1_max = max(ban_intensity_new1), by(BankID)
{txt}
{com}. 
. bys BankID: egen total_ban=total(ban_intensity)
{txt}
{com}. gen strong_ban=(total_ban>0.995918 )
{txt}
{com}. 
. 
. preserve
{txt}
{com}. keep if year == 2020
{txt}(204,675 observations deleted)

{com}. keep BankID total_coal_vol* ban_intensity* ban_intensity_new1* has_coded_policy active_policy
{txt}
{com}. merge 1:1 BankID using ../Raw/Bank_Sample/BankSample_List, keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          13,645{txt}  
{col 5}{hline 41}

{com}. gsort -total_coal_vol
{txt}
{com}. gen rank = _n 
{txt}
{com}. gen top100 = rank <= 100
{txt}
{com}. tab has_coded_policy top100

{txt}has_coded_ {c |}        top100
    policy {c |}         0          1 {c |}     Total
{hline 11}{c +}{hline 22}{c +}{hline 10}
         0 {c |}{res}    13,517         52 {txt}{c |}{res}    13,569 
{txt}         1 {c |}{res}        28         48 {txt}{c |}{res}        76 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
     Total {c |}{res}    13,545        100 {txt}{c |}{res}    13,645 
{txt}
{com}. rename ban_intensity ban_intensity2020
{res}{txt}
{com}. rename active_policy active_policy2020
{res}{txt}
{com}. gen strong_policy2020 = ban_intensity2020 > 0.29
{txt}
{com}. gen medium_policy2020 = ban_intensity2020 <= 0.29 & has_coded_policy == 1
{txt}
{com}. gen no_policy2020 = has_coded_policy == 0
{txt}
{com}. 
. gen strong_policy_max = ban_intensity_max > 0.42
{txt}
{com}. gen medium_policy_max = ban_intensity_max <= 0.42 & has_coded_policy == 1
{txt}
{com}. gen no_policy_max = has_coded_policy == 0
{txt}
{com}. 
. gen strong_policy_new1_max = ban_intensity_new1_max > 0.57
{txt}
{com}. gen medium_policy_new1_max = ban_intensity_new1_max <= 0.57 & has_coded_policy == 1
{txt}
{com}. gen no_policy_new1_max = has_coded_policy == 0
{txt}
{com}. 
. keep BankID total_coal_vol* rank ban_intensity2020 active_policy2020 ban_intensity_max top100 strong_* medium_* no_policy* ban_intensity_max ban_intensity_new1_max
{txt}
{com}. 
. tempfile cx 
{txt}
{com}. save `cx'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000028{rm}
saved
as .dta format
{p_end}

{com}. 
. restore
{txt}
{com}. 
. merge m:1 BankID using `cx', keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}         218,320{txt}  
{col 5}{hline 41}

{com}. save ../Intermediate/bank_lending_panel, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_lending_panel.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_lending_panel.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. ** BUILD BORROWER PRETRENDS
. include "../Data_Cleaning/Build_Borrow_Pretrends.do"
{txt}
{com}. 
. use ../Intermediate/borrowing_panel, clear
{txt}
{com}. 
. //get betas for different time periods and different condings of debt
. gen pos_borr = borr_debt > 0
{txt}
{com}. gen log1pdebt = log(1+borr_debt)
{txt}
{com}. gen logdebt = log(borr_debt)
{txt}(18,432 missing values generated)

{com}. 
. 
. tempfile betasl1p 
{txt}
{com}. statsby _b , by(borrower_id) saving(`betasl1p'): reg log1pdebt year if inrange(year,2005,2013)
{res}{txt}(running {bf:regress} on estimation sample)
{p2colset 7 16 20 2}{...}

{p2col :Command:}{res:regress log1pdebt year if inrange(year,2005,2013)}{p_end}
           By: {res}borrower_id

{txt}Statsby groups:
(53 missing values generated)
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
............................

{com}. tempfile betaspos
{txt}
{com}. statsby _b , by(borrower_id) saving(`betaspos'): reg pos_borr year if inrange(year,2005,2013)
{res}{txt}(running {bf:regress} on estimation sample)
{res}{p2colset 7 16 20 2}{...}

{txt}{p2col :Command:}{res:regress pos_borr year if inrange(year,2005,2013)}{p_end}
           By: {res}borrower_id

{txt}Statsby groups:
(53 missing values generated)
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
............................

{com}. tempfile beta0913
{txt}
{com}. statsby _b , by(borrower_id) saving(`beta0913'): reg log1pdebt year if inrange(year,2009,2013)
{res}{txt}(running {bf:regress} on estimation sample)
{res}{p2colset 7 16 20 2}{...}

{txt}{p2col :Command:}{res:regress log1pdebt year if inrange(year,2009,2013)}{p_end}
           By: {res}borrower_id

{txt}Statsby groups:
(53 missing values generated)
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
............................

{com}. 
. 
. //look at debt growth 2005-2009 vs 2010-2013
. egen borr_debt_0509 = total(borr_debt*inrange(year,2005,2009)), by(borrower_id)
{txt}
{com}. egen borr_debt_1013 = total(borr_debt*inrange(year,2010,2013)), by(borrower_id)
{txt}
{com}. 
. keep borrower_id borr_debt_0509 borr_debt_1013
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(22,308 observations deleted)

{com}. merge 1:1 borrower_id using `betasl1p', nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               1
{txt}{col 9}from master{col 30}{res}               1{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             428{txt}  
{col 5}{hline 41}

{com}. rename _b* _b*_l1p
{res}{txt}
{com}. merge 1:1 borrower_id using `betaspos', nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               1
{txt}{col 9}from master{col 30}{res}               1{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             428{txt}  
{col 5}{hline 41}

{com}. rename _b_year _b_year_pd
{res}{txt}
{com}. rename _b_cons _b_cons_pd
{res}{txt}
{com}. merge 1:1 borrower_id using `beta0913', nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               1
{txt}{col 9}from master{col 30}{res}               1{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             428{txt}  
{col 5}{hline 41}

{com}. rename _b_year _b_year_0913
{res}{txt}
{com}. rename _b_cons _b_cons_0913
{res}{txt}
{com}. gen pre_growth = borr_debt_1013/borr_debt_0509-1
{txt}(202 missing values generated)

{com}. gen log_pre_growth = log(1+borr_debt_1013)-log(1+borr_debt_0509)
{txt}
{com}. rename pre_growth pre_growth_borr
{res}{txt}
{com}. rename log_pre_growth log_pre_growth_borr
{res}{txt}
{com}. 
. save ../Intermediate/borrower_pretrends, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/borrower_pretrends.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/borrower_pretrends.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. 
. ** BUILD BANK PRETRENDS
. include "../Data_Cleaning/Build_Bank_Pretrends.do"
{txt}
{com}. 
. 
. ** GET BANK PRE-PERIOD SHARES OF COAL LENDING BY BORROWER CONTINENT
. use ../Intermediate/bank_lending_panel, clear 
{txt}
{com}. keep BankID year debt debt_eur debt_asia debt_na
{txt}
{com}. keep if inrange(year,2009,2013)
{txt}(150,095 observations deleted)

{com}. collapse (sum) debt debt_*, by(BankID)
{res}{txt}
{com}. gen frac_debt_eur_pre = debt_eur/debt 
{txt}(13,001 missing values generated)

{com}. gen frac_debt_asia_pre = debt_asia/debt 
{txt}(13,001 missing values generated)

{com}. gen frac_debt_na_pre = debt_na/debt
{txt}(13,001 missing values generated)

{com}. foreach var of var frac_* {c -(}
{txt}  2{com}.         replace `var' = 0 if missing(`var')
{txt}  3{com}. {c )-}
{txt}(13,001 real changes made)
(13,001 real changes made)
(13,001 real changes made)

{com}. egen coal_total_pre = total(debt)
{txt}
{com}. gen bank_share_coal_pre = debt/coal_total_pre
{txt}
{com}. 
. keep BankID frac_* bank_share_coal_pre
{txt}
{com}. tempfile pre_geo 
{txt}
{com}. save `pre_geo'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002c{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. ** Now get bank relationship weights with coal borrowers
. use ../Intermediate/transaction_lender_clean, clear
{txt}
{com}. joinby transaction_id using ../Intermediate/transaction_clean
{txt}
{com}. gen year = yofd(date_trans)
{txt}
{com}. drop if missing(year)
{txt}(0 observations deleted)

{com}. drop if missing(BankID)
{txt}(875 observations deleted)

{com}. drop if year >= 2022
{txt}(3,177 observations deleted)

{com}. drop if amount_trans_lender_usdm < 0
{txt}(1,084 observations deleted)

{com}. 
. collapse (sum) amount_trans_lender_usdm, by(BankID borrower_id year)
{res}{txt}
{com}. 
. egen bank_coal_year_amt = total(amount_trans_lender_usdm), by(BankID year)
{txt}
{com}. 
. gen pre_period = year >= 2009 & year <= 2013
{txt}
{com}. gen post_period = year >= 2014
{txt}
{com}. 
. 
. gen pre_period_a = year>=2005 & year <= 2009
{txt}
{com}. gen pre_period_b = year>=2010 & year <= 2013
{txt}
{com}. 
. //get betas
. preserve 
{txt}
{com}.         collapse (sum) amount_trans_lender_usdm, by(BankID year)
{res}{txt}
{com}.         xtset BankID year
{res}
{col 1}{txt:Panel variable: }{res:BankID}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:1983}}{txt: to }{res:{bind:2021}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}.         keep if inrange(year,2005,2013)
{txt}(6,526 observations deleted)

{com}.         tsfill, full
{txt}
{com}.         replace amount_trans_lender_usdm = 0 if missing(amount_trans_lender_usdm)
{txt}(4,637 real changes made)

{com}.         gen logdebt = log(1+amount_trans_lender_usdm)
{txt}
{com}.         tempfile betas0513
{txt}
{com}.         statsby _b, by(BankID) saving(`betas0513'): reg logdebt year if inrange(year,2005,2013)
{res}{txt}(running {bf:regress} on estimation sample)
{res}{p2colset 7 16 20 2}{...}

{txt}{p2col :Command:}{res:regress logdebt year if inrange(year,2005,2013)}{p_end}
           By: {res}BankID

{txt}Statsby groups:
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
.....................................

{com}.         tempfile betas0913
{txt}
{com}.         statsby _b, by(BankID) saving(`betas0913'): reg logdebt year if inrange(year,2009,2013)
{res}{txt}(running {bf:regress} on estimation sample)
{res}{p2colset 7 16 20 2}{...}

{txt}{p2col :Command:}{res:regress logdebt year if inrange(year,2009,2013)}{p_end}
           By: {res}BankID

{txt}Statsby groups:
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
.....................................

{com}. restore
{txt}
{com}. 
. 
. //get pre period total coal lending by bank
. egen bank_coal_pre_amt = total(amount_trans_lender_usdm*pre_period), by(BankID)
{txt}
{com}. egen bank_coal_post_amt = total(amount_trans_lender_usdm*post_period), by(BankID)
{txt}
{com}. 
. egen bank_coal_pre_amt_a = total(amount_trans_lender_usdm*pre_period_a), by(BankID)
{txt}
{com}. egen bank_coal_pre_amt_b = total(amount_trans_lender_usdm*pre_period_b), by(BankID)
{txt}
{com}. 
. gen bank_coal_growth_pre = log(bank_coal_pre_amt_b)-log(bank_coal_pre_amt_a)
{txt}(3,067 missing values generated)

{com}. 
. //get pre period total coal lending for bank/borrower pairs 
. egen bank_firm_pre_amt = total(amount_trans_lender_usdm*pre_period), by(BankID borrower_id)
{txt}
{com}. 
. //get exposure of bank to each firm
. gen bank_exp_firm_pre = bank_firm_pre_amt/bank_coal_pre_amt
{txt}(1,755 missing values generated)

{com}. 
. bys BankID borrower_id: gen bank_firm_cx = _n == 1
{txt}
{com}. 
. //conditional on relationship in pre period, the median coal firm is 2% of banks coal portfolio, mean is 12%
. sum bank_exp_firm_pre if bank_firm_cx == 1 & bank_exp_firm_pre > 0, de

                      {txt}bank_exp_firm_pre
{hline 61}
      Percentiles      Smallest
 1%    {res} .0000408       8.41e-08
{txt} 5%    {res} .0006787       1.27e-07
{txt}10%    {res} .0018729       1.72e-07       {txt}Obs         {res}      4,864
{txt}25%    {res} .0075962       4.08e-07       {txt}Sum of wgt. {res}      4,864

{txt}50%    {res} .0274237                      {txt}Mean          {res} .1375411
                        {txt}Largest       Std. dev.     {res} .2635417
{txt}75%    {res} .1000689              1
{txt}90%    {res} .4552963              1       {txt}Variance      {res} .0694543
{txt}95%    {res}        1              1       {txt}Skewness      {res} 2.483474
{txt}99%    {res}        1              1       {txt}Kurtosis      {res} 7.991106
{txt}
{com}. 
. 
. 
. egen n_firms_bank_pre = nvals(borrower_id) if pre_period == 1, by(BankID)
{txt}(28,922 missing values generated)

{com}. bys BankID (n_firms_bank_pre): replace n_firms_bank_pre = n_firms_bank_pre[1]
{txt}(27139 real changes made)

{com}. replace n_firms_bank_pre = 0 if missing(n_firms_bank_pre) //banks that have no coal borrowers in pre period
{txt}(1,783 real changes made)

{com}. keep BankID borrower_id n_firms_bank_pre bank_coal_pre_amt bank_coal_post_amt bank_exp_firm_pre bank_coal_growth_pre
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(24,074 observations deleted)

{com}. duplicates report BankID borrower_id

{p 0 4}{txt}Duplicates in terms of {res} BankID borrower_id{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}        {res}12931             0
{txt}{hline 10}{c BT}{hline 27}

{com}. 
. 
. 
. //merge in borrower pretrends
. merge m:1 borrower_id using ../Intermediate/borrower_pretrends, keep(3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          12,851{txt}  
{col 5}{hline 41}

{com}. rename _b* _b_firm*
{res}{txt}
{com}. //make bank portfolio aggregates of firms 
. merge m:1 borrower_id using ../Intermediate/borrower_chars, keep(1 3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             216
{txt}{col 9}from master{col 30}{res}             216{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          12,635{txt}  
{col 5}{hline 41}

{com}. 
. gen coalshare = CoalSharePower
{txt}(3,047 missing values generated)

{com}. replace coalshare = CoalFracRev if missing(coalshare)
{txt}(1,716 real changes made)

{com}. 
. //form bank pre-period portfolio characteristics
. collapse (mean) pre_growth_borr log_pre_growth_borr coalshare bank_coal_growth_pre borr_debt_* _b_* CoalSharePower CoalFracRev InstalledCoalPowerCapacity expansion_* coal_industry_* n_firms_bank_pre bank_coal_pre_amt bank_coal_post_amt [aweight=bank_exp_firm_pre], by(BankID)
{res}{txt}
{com}. 
. //merge in pretrend betas
. merge m:1 BankID using `betas0513', keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}             669{txt}  
{col 5}{hline 41}

{com}. rename _b_year _b_bank_year_0513
{res}{txt}
{com}. drop _b_cons
{txt}
{com}. merge m:1 BankID using `betas0913', keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}             669{txt}  
{col 5}{hline 41}

{com}. rename _b_year _b_bank_year_0913
{res}{txt}
{com}. drop _b_cons
{txt}
{com}. 
. merge 1:1 BankID using `pre_geo', keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               1
{txt}{col 9}from master{col 30}{res}               1{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             668{txt}  
{col 5}{hline 41}

{com}. 
. save ../Intermediate/bank_coal_pretrends, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_coal_pretrends.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_coal_pretrends.dta{rm}
saved
{p_end}

{com}. 
. 
. {txt}
{com}. 
. *************************************************************
. ************ PRODUCE MAIN TABLES AND FIGURES
. *************************************************************
. 
. //This file produces all main tables in the paper
. include "../Data_Cleaning/Analysis_Policy_Determinants.do" //Prepare Table 3
{txt}
{com}. ************************************************************************
. * Build bank lender charactersitics (used to explore determinants of divestment policies)
. *
. ***********************************************************************
. 
. * Part 1: construct a bank lending amount panel from DealScan tranches data (at parent bank level) 
. use "../Raw/psedo/DealScan/tr_dealscan_newformat_tranchelevel", clear
{txt}
{com}. 
. //identify GCEL borrowers
. ren Borrower_Id CompanyID_DS
{res}{txt}
{com}. joinby CompanyID_DS using ../Intermediate/dealscan_borrowerid_map, unmatched(both)
{txt}
{com}. gen is_gcel_trans = (_merge == 3)
{txt}
{com}. drop _merge
{txt}
{com}. 
. //get borrower industry information
. rename CompanyID_DS Borrower_Id 
{res}{txt}
{com}. merge m:1 Borrower_Id using ../Raw/DealScan/tr_dealscan_newformat_borrowerdemographic, keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             348
{txt}{col 9}from master{col 30}{res}             348{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}         460,399{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen is_powerutil = substr(string(naics_code),1,4) == "2211"
{txt}
{com}. gen is_coalmining = inlist(substr(string(naics_code),1,4),"2121","2131")
{txt}
{com}. gen is_oilgas = inlist(substr(string(naics_code),1,4),"2111")
{txt}
{com}. gen is_energy = is_oilgas | is_coalmining | is_powerutil 
{txt}
{com}. gen is_gcel_coal = is_gcel_trans | is_coalmining
{txt}
{com}. drop is_powerutil is_oilgas
{txt}
{com}. keep LPC_Tranche_ID Tranche_Active_Date Tranche_Amount_Converted is_gcel_trans is_energy is_coalmining is_gcel_coal
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(729 observations deleted)

{com}. drop if missing(LPC_Tranche_ID)
{txt}(1 observation deleted)

{com}. 
. //For psedo-data only (In true data, these are already unique and the code performs nothing)
. unique LPC_Tranche_ID Tranche_Active_Date
{txt}Number of unique values of LPC_Tranche_ID Tranche_Active_Date is  {res}460014
{txt}Number of records is  {res}460017
{txt}
{com}. duplicates tag LPC_Tranche_ID Tranche_Active_Date, gen(tag)

{p 0 4}{txt}Duplicates in terms of {res} LPC_Tranche_ID Tranche_Active_Date{p_end}
{txt}
{com}. drop if tag >= 1
{txt}(6 observations deleted)

{com}. drop tag
{txt}
{com}. 
. tempfile tranche_amt
{txt}
{com}. save `tranche_amt'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002g{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Raw/psedo/Dealscan/tr_dealscan_newformat_tranchelender.dta", clear
{txt}
{com}. keep LPC_Tranche_ID Tranche_Active_Date Lender_Id Lender_Share 
{txt}
{com}. 
. * allocalte loan share equally among lenders in a tranche-tranche_date when lender shares are missing
. egen tot_allocation_frac = sum(Lender_Share), by(LPC_Tranche_ID Tranche_Active_Date)
{txt}
{com}. egen nmiss_alloc = sum(missing(Lender_Share)), by(LPC_Tranche_ID Tranche_Active_Date)
{txt}
{com}. replace Lender_Share = (100-tot_allocation_frac)/nmiss_alloc if missing(Lender_Share)
{txt}(0 real changes made)

{com}. replace Lender_Share = 0 if Lender_Share<0 
{txt}(0 real changes made)

{com}. drop tot_allocation_frac nmiss_alloc
{txt}
{com}. 
. 
. tempfile tranche_lendershare
{txt}
{com}. save `tranche_lendershare'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002h{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Raw/DealScan/tr_dealscan_newformat_lenderdemographic", clear
{txt}
{com}. keep Lender_Id Lender_Operating_Country
{txt}
{com}. destring Lender_Id, ignore("N/A") replace
{txt}Lender_Id already numeric; no {res}replace
{txt}
{com}. drop if missing(Lender_Id)
{txt}(0 observations deleted)

{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. 
. tempfile lenderinfo
{txt}
{com}. save `lenderinfo'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002i{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. use "../Raw/Bank_Sample/Dealscan_Bank_BankSample_Link.dta",clear
{txt}
{com}. ren LoanConnector_Company_ID Lender_Id
{res}{txt}
{com}. 
. tempfile crosswalk_to_main_data
{txt}
{com}. save `crosswalk_to_main_data'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002j{rm}
saved
as .dta format
{p_end}

{com}. 
. * assemble datasets
. use `tranche_lendershare', clear
{txt}
{com}. merge m:1 Lender_Id  using `lenderinfo', nogen keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}       2,631,560{txt}  
{col 5}{hline 41}

{com}. merge m:1 Lender_Id  using `crosswalk_to_main_data'
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         324,367
{txt}{col 9}from master{col 30}{res}         324,367{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}       2,307,193{txt}  (_merge==3)
{col 5}{hline 41}

{com}. merge m:1 Lender_Id  using `crosswalk_to_main_data', nogen keep(3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}       2,307,193{txt}  
{col 5}{hline 41}

{com}. merge m:1 LPC_Tranche_ID Tranche_Active_Date using `tranche_amt', nogen keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}              44
{txt}{col 9}from master{col 30}{res}              44{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}       2,307,149{txt}  
{col 5}{hline 41}

{com}. 
. * calculate dollar amount a bank lend in each transaction
. gen lending_amt = Lender_Share/100*Tranche_Amount_Converted
{txt}(44 missing values generated)

{com}. gen lending_amt_gcel = lending_amt*is_gcel_trans
{txt}(44 missing values generated)

{com}. gen lending_amt_coal = lending_amt*is_gcel_coal
{txt}(44 missing values generated)

{com}. gen lending_amt_energy = lending_amt*is_energy
{txt}(44 missing values generated)

{com}. gen year = year(Tranche_Active_Date)
{txt}
{com}. 
. drop if missing(BankID)
{txt}(36 observations deleted)

{com}. * collapse to bank-year level 
. 
. //keep most common operating country by BankID 
. bys BankID Lender_Operating_Country: gen nrecCountry = _N
{txt}
{com}. bys BankID (nrecCountry): gen Lender_Country = Lender_Operating_Country[_N]
{txt}
{com}. drop Lender_Operating_Country
{txt}
{com}. 
. collapse (sum) lending_amt lending_amt_coal lending_amt_energy lending_amt_gcel  (firstnm) Lender_Country, by(BankID year)
{res}{txt}
{com}. merge m:1 BankID using ../Raw/Bank_Sample/BankSample_List, keepusing(BankName) keep(3) nogen 
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          19,428{txt}  
{col 5}{hline 41}

{com}. order BankName, after(BankID)
{txt}
{com}. 
. tempfile bank_lending_panel_allsample
{txt}
{com}. save `bank_lending_panel_allsample'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002k{rm}
saved
as .dta format
{p_end}

{com}. 
. * Part 3: Create bank characteristics variables of interest
. use `bank_lending_panel_allsample', clear
{txt}
{com}. 
. // size of lending activity (in $m) for 2009-2014 period (yearly average)
. gen pre_treat_period = 1 if year == 2009 | year==2010 | year==2011 | year==2012 | year==2013 | year==2014
{txt}(15,291 missing values generated)

{com}. gen post_period = year > 2014 & ~missing(year)
{txt}
{com}. 
. bys BankID: gen first = _n == 1
{txt}
{com}. 
. gen lending_amt_all = lending_amt
{txt}
{com}. 
. foreach subs in all coal energy gcel {c -(}
{txt}  2{com}.         di "`subs'"
{txt}  3{com}.         egen lending_`subs'_pre_avg = sum(lending_amt_`subs'/6) if pre_treat_period == 1, by(BankID)
{txt}  4{com}.         bys BankID (lending_`subs'_pre_avg): replace lending_`subs'_pre_avg = lending_`subs'_pre_avg[1]
{txt}  5{com}.         //post period quantities
.         egen lending_`subs'_post_avg = sum(lending_amt_`subs'/7) if post_period == 1, by(BankID)
{txt}  6{com}.         bys BankID (lending_`subs'_post_avg): replace lending_`subs'_post_avg = lending_`subs'_post_avg[1]
{txt}  7{com}.         //share of pre-period and post-period lending activity in coal and broader energy
.         if "`subs'" ~= "all" {c -(}
{txt}  8{com}.                 gen share_`subs'_pre = lending_`subs'_pre_avg/lending_all_pre_avg
{txt}  9{com}.                 gen share_`subs'_post = lending_`subs'_post_avg/lending_all_post_avg
{txt} 10{com}.                 gen delta_share_`subs'_lvl = share_`subs'_post-share_`subs'_pre
{txt} 11{com}.                 gen delta_share_`subs'_pct = share_`subs'_post/share_`subs'_pre-1
{txt} 12{com}.         {c )-}
{txt} 13{com}. {c )-}
all
{txt}(15,291 missing values generated)
(13450 real changes made)
(14,061 missing values generated)
(11667 real changes made)
coal
(15,291 missing values generated)
(13450 real changes made)
(14,061 missing values generated)
(11667 real changes made)
(1,841 missing values generated)
(2,394 missing values generated)
(2,805 missing values generated)
(5,953 missing values generated)
energy
(15,291 missing values generated)
(13450 real changes made)
(14,061 missing values generated)
(11667 real changes made)
(1,841 missing values generated)
(2,394 missing values generated)
(2,805 missing values generated)
(5,775 missing values generated)
gcel
(15,291 missing values generated)
(13450 real changes made)
(14,061 missing values generated)
(11667 real changes made)
(1,841 missing values generated)
(2,394 missing values generated)
(2,805 missing values generated)
(6,586 missing values generated)

{com}. gen coal_share_energy_pre = share_coal_pre/share_energy_pre
{txt}(5,386 missing values generated)

{com}. gen coal_share_energy_post = share_coal_post/share_energy_post
{txt}(4,741 missing values generated)

{com}. 
. 
. xtset BankID year
{res}
{col 1}{txt:Panel variable: }{res:BankID}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:1981}}{txt: to }{res:{bind:2022}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. tssmooth ma lending_amt_coal_ma3 = lending_amt_coal, window(2 1) 
{txt}The smoother applied was
{res}{p 5 5 5} by BankID : (1/3)*[x(t-2) + x(t-1) + 1*x(t)]; x(t)= lending_amt_coal{p_end}
{txt}Note: Missing values are given a weight of zero in the smoother.

{com}. 
. bys  BankID (year): gen CAGR_coal_lending_1014 = (lending_amt_coal/L4.lending_amt_coal)^(1/4) - 1 if year == 2014
{txt}(19,124 missing values generated)

{com}. bys  BankID (year): gen CAGR_coal_lending_1014_ma3 = (lending_amt_coal_ma3/L4.lending_amt_coal_ma3)^(1/4) - 1 if year == 2014
{txt}(19,034 missing values generated)

{com}. 
. bys  BankID (year): gen CAGR_coal_lending_0914 = (lending_amt_coal/L5.lending_amt_coal)^(1/5) - 1 if year == 2014
{txt}(19,139 missing values generated)

{com}. bys  BankID (year): gen CAGR_coal_lending_0914_ma3 = (lending_amt_coal_ma3/L5.lending_amt_coal_ma3)^(1/5) - 1 if year == 2014
{txt}(19,061 missing values generated)

{com}. 
. bys  BankID (year): gen CAGR_coal_lending_0915 = (lending_amt_coal/L6.lending_amt_coal)^(1/6) - 1 if year == 2015
{txt}(19,141 missing values generated)

{com}. bys  BankID (year): gen CAGR_coal_lending_0915_ma3 = (lending_amt_coal_ma3/L6.lending_amt_coal_ma3)^(1/6) - 1 if year == 2015
{txt}(19,066 missing values generated)

{com}. 
. // convert to percentage pts and make them cross-sectional
. replace CAGR_coal_lending_1014 =CAGR_coal_lending_1014*100
{txt}(304 real changes made)

{com}. replace CAGR_coal_lending_1014_ma3 =CAGR_coal_lending_1014_ma3*100
{txt}(394 real changes made)

{com}. replace CAGR_coal_lending_0914 = CAGR_coal_lending_0914*100
{txt}(289 real changes made)

{com}. replace  CAGR_coal_lending_0914_ma3 =  CAGR_coal_lending_0914_ma3*100
{txt}(367 real changes made)

{com}. replace CAGR_coal_lending_0915 = CAGR_coal_lending_0915*100
{txt}(287 real changes made)

{com}. replace CAGR_coal_lending_0915_ma3 = CAGR_coal_lending_0915_ma3*100
{txt}(362 real changes made)

{com}. 
. bysort BankID (CAGR_coal_lending_1014): replace CAGR_coal_lending_1014=CAGR_coal_lending_1014[1]
{txt}(8168 real changes made)

{com}. bysort BankID (CAGR_coal_lending_1014_ma3): replace CAGR_coal_lending_1014_ma3=CAGR_coal_lending_1014_ma3[1]
{txt}(10252 real changes made)

{com}. bysort BankID (CAGR_coal_lending_0914): replace CAGR_coal_lending_0914=CAGR_coal_lending_0914[1]
{txt}(7901 real changes made)

{com}. bysort BankID (CAGR_coal_lending_0914_ma3): replace CAGR_coal_lending_0914_ma3=CAGR_coal_lending_0914_ma3[1]
{txt}(9765 real changes made)

{com}. bysort BankID (CAGR_coal_lending_0915): replace CAGR_coal_lending_0915=CAGR_coal_lending_0915[1]
{txt}(7879 real changes made)

{com}. bysort BankID (CAGR_coal_lending_0915_ma3): replace CAGR_coal_lending_0915_ma3=CAGR_coal_lending_0915_ma3[1]
{txt}(9689 real changes made)

{com}. 
. // Delta of share of coal lending (in p.p.) for 2014-2013 v.s 2009-2010
. bysort BankID (year): gen coal_lending_1314 = (lending_amt_coal+l.lending_amt_coal)/2 if year==2014
{txt}(18,797 missing values generated)

{com}. bysort BankID (year): gen coal_lending_0910 = (lending_amt_coal+l.lending_amt_coal)/2 if year==2010
{txt}(18,835 missing values generated)

{com}. 
. bysort BankID (coal_lending_1314): replace coal_lending_1314=coal_lending_1314[1]
{txt}(14163 real changes made)

{com}. bysort BankID (coal_lending_0910): replace coal_lending_0910=coal_lending_0910[1]
{txt}(13759 real changes made)

{com}. 
. gen delta_coal_lending_1314_0910 = [(coal_lending_1314/coal_lending_0910)-1]*100
{txt}(9,805 missing values generated)

{com}. 
. 
. // bank-level estimate on pre-period coal lending growth
. gen log_lending = log(1+lending_amt_coal)
{txt}
{com}. statsby, by(BankID) saving(../Intermediate/DS_bankcoalgrowth_estimate, replace): regress log_lending year if pre_treat_period == 1
{res}{txt}(running {bf:regress} on estimation sample)
{res}{p2colset 7 16 20 2}{...}

{txt}{p2col :Command:}{res:regress log_lending year if pre_treat_period == 1}{p_end}
           By: {res}BankID
{txt}{p 0 4 2}
(file {bf}
../Intermediate/DS_bankcoalgrowth_estimate.dta{rm}
not found)
{p_end}

Statsby groups:
....{err}x{txt}.................{err}x{txt}...{err}x{txt}..{err}x{txt}....{err}x{txt}.{err}x{txt}..{err}x{txt}.......{err}x{txt}..    50
.......{err}x{txt}........{err}x{txt}.................{err}x{txt}.........{err}x{txt}.....   100
......{err}x{txt}.{err}xxx{txt}........{err}x{txt}.{err}x{txt}.....................{err}x{txt}...{err}x{txt}..   150
...{err}x{txt}....................{err}x{txt}............{err}x{txt}.{err}x{txt}..........   200
..{err}x{txt}....{err}x{txt}..{err}x{txt}...{err}x{txt}.....{err}x{txt}..............{err}xx{txt}...........{err}x{txt}.   250
.{err}x{txt}....{err}x{txt}...{err}x{txt}......{err}x{txt}.{err}x{txt}..{err}x{txt}.{err}x{txt}.{err}xx{txt}....{err}x{txt}..{err}xxx{txt}.......{err}xx{txt}...   300
....{err}x{txt}.............{err}x{txt}............{err}x{txt}.............{err}x{txt}...{err}x{txt}   350
............{err}x{txt}.......................{err}xxx{txt}...{err}x{txt}.......   400
....{err}x{txt}.....................{err}x{txt}..............{err}x{txt}.{err}x{txt}......   450
........{err}x{txt}.......{err}x{txt}.......{err}x{txt}...{err}x{txt}..............{err}x{txt}......   500
...{err}x{txt}..{err}x{txt}....{err}x{txt}...{err}x{txt}....{err}x{txt}......{err}x{txt}..{err}x{txt}...{err}x{txt}...............   550
...................{err}x{txt}..........{err}xx{txt}....{err}x{txt}..{err}x{txt}.{err}x{txt}...{err}x{txt}....   600
{err}x{txt}....{err}xx{txt}............{err}x{txt}...{err}x{txt}...{err}x{txt}................{err}x{txt}.....   650
..........{err}x{txt}......{err}x{txt}.......{err}x{txt}..{err}x{txt}......{err}x{txt}......{err}xx{txt}......   700
..............{err}xxx{txt}.{err}x{txt}......{err}xxx{txt}.............{err}x{txt}..{err}x{txt}..{err}x{txt}.{err}x{txt}   750
{err}x{txt}...{err}x{txt}...{err}x{txt}...{err}x{txt}.......................{err}x{txt}..........{err}x{txt}..   800
..{err}x{txt}.....{err}xx{txt}......{err}x{txt}...................{err}x{txt}............{err}x{txt}   850
{err}x{txt}.........{err}x{txt}.....{err}xx{txt}.........{err}x{txt}..{err}x{txt}.{err}x{txt}.{err}x{txt}.......{err}x{txt}...{err}x{txt}...   900
...{err}xx{txt}...{err}x{txt}...{err}x{txt}....{err}x{txt}...{err}x{txt}..{err}x{txt}.....{err}x{txt}..{err}x{txt}.

{com}. 
. * Part 4: collapse to cross-sectional data at bank level
. drop lending_amt* pre_treat_period post_period first year log_lending
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(18,135 observations deleted)

{com}. duplicates report BankID 

{p 0 4}{txt}Duplicates in terms of {res} BankID{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}         {res}1293             0
{txt}{hline 10}{c BT}{hline 27}

{com}. 
. save "../Intermediate/bank_characteristics_DS.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_characteristics_DS.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_characteristics_DS.dta{rm}
saved
{p_end}

{com}. 
. 
. ************************************************************************
. * Build bank lender charactersitics (used to explore determinants of divestment policies)
. * with IJ Global data
. ***********************************************************************
. 
. * Part 1: construct a bank lending amount panel from IJ Global tranches data (at parent bank level) 
. 
. * code adopted from "build_transaction_files"
. 
. ** prepare gcel borrowers
. use ../Raw/IJGlobal/transaction_borrower_records, clear
{txt}
{com}. recast str100 Borrower_CompanyName Borrower_ParentCompany
{txt}
{com}. rename Borrower_CompanyName Borrower_CompanyName_IJG
{res}{txt}
{com}. rename Borrower_ParentCompany Borrower_ParentCompany_IJG
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. joinby Borrower_CompanyName_IJG using ../Intermediate/ijglobal_borrowerid_map
{txt}
{com}. keep TransactionId borrower_id 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(38 observations deleted)

{com}. merge m:1 borrower_id using ../Intermediate/borrower_file, keepusing(borrower_name) keep(3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}           4,647{txt}  
{col 5}{hline 41}

{com}. tempfile ij_borrower_map
{txt}
{com}. save `ij_borrower_map'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002l{rm}
saved
as .dta format
{p_end}

{com}. 
. ** prepare bank link to main dataset
. use  ../Raw/Bank_Sample/IJG_Bank_BankSample_Link, clear
{txt}
{com}. keep IJG_BankName BankID
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. rename IJG_BankName Lender_CompanyName
{res}{txt}
{com}. tempfile crosswalk_to_main_data 
{txt}
{com}. save `crosswalk_to_main_data'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002m{rm}
saved
as .dta format
{p_end}

{com}. 
. ** find each lender's share in transaction
. use ../Raw/psedo/IJGlobal/transaction_level_data, clear
{txt}
{com}. 
. gen is_powerutil = strpos(TransactionSector, "Power")
{txt}
{com}. gen is_coalmining = strpos(TransactionSector, "Mining")
{txt}
{com}. gen is_oilgas = strpos(TransactionSector, "Oil & Gas")
{txt}
{com}. gen is_energy = is_oilgas | is_coalmining | is_powerutil 
{txt}
{com}. 
. keep TransactionId is_powerutil is_coalmining is_oilgas is_energy
{txt}
{com}. merge 1:m TransactionId using ../Raw/psedo/IJGlobal/debt_records_tranchelevel, keepusing(TrancheId TrancheValuem TrancheMaturityStartDate) keep(3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:TransactionId} was {bf:float}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          23,790{txt}  
{col 5}{hline 41}

{com}. merge 1:m TrancheId using ../Raw/psedo/IJGlobal/debt_records_tranche_lender_level, keep(3) keepusing(Lender_CompanyName Lender_CompanyName LTAccreditedValuem) nogen 
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          81,885{txt}  
{col 5}{hline 41}

{com}. 
. preserve
{txt}
{com}. joinby TransactionId using `ij_borrower_map', unmatched(both) 
{txt}
{com}. gen is_gcel_trans = (_merge == 3)
{txt}
{com}. drop _merge
{txt}
{com}. collapse (max) is_gcel_trans, by(TransactionId)
{res}{txt}
{com}. tempfile gceltrans 
{txt}
{com}. save `gceltrans'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002o{rm}
saved
as .dta format
{p_end}

{com}. restore
{txt}
{com}. 
. merge m:1 TransactionId using `gceltrans'
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           2,307
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}           2,307{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          81,885{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. gen is_gcel_coal = is_gcel_trans | is_coalmining
{txt}
{com}. drop if missing(TrancheId)
{txt}(2,307 observations deleted)

{com}. 
. 
. // merge with link to main dataset
. recast str Lender_CompanyName
{txt}
{com}. merge m:1 Lender_CompanyName  using `crosswalk_to_main_data', nogen keep(3)
{res}{txt}{p 0 7 2}
(variable
{bf:Lender_CompanyName} was {bf:str90}, now {bf:str100} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          76,921{txt}  
{col 5}{hline 41}

{com}. 
. sort TransactionId TrancheId
{txt}
{com}. order TransactionId TrancheId BankID Lender_CompanyName
{txt}
{com}. 
. ren LTAccreditedValuem lending_amt
{res}{txt}
{com}. gen lending_amt_gcel = lending_amt*is_gcel_trans
{txt}
{com}. gen lending_amt_coal = lending_amt*is_gcel_coal
{txt}
{com}. gen lending_amt_energy = lending_amt*is_energy
{txt}
{com}. gen year = year(TrancheMaturityStartDate)
{txt}
{com}. 
. drop if missing(BankID)
{txt}(532 observations deleted)

{com}. drop if missing(year)
{txt}(0 observations deleted)

{com}. 
. ** collapse to a bank-year panel dataset
. 
. collapse (sum) lending_amt lending_amt_gcel lending_amt_coal lending_amt_energy, by(BankID year)
{res}{txt}
{com}. merge m:1 BankID using ../Raw/Bank_Sample/BankSample_List, keepusing(BankName) keep(3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          14,096{txt}  
{col 5}{hline 41}

{com}. order BankName, after(BankID)
{txt}
{com}. 
. sort BankID year
{txt}
{com}. 
. tempfile bank_lending_panel_IJsample
{txt}
{com}. save `bank_lending_panel_IJsample'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002p{rm}
saved
as .dta format
{p_end}

{com}. 
. * Part 2: Create bank characteristics variables of interest
. 
. use `bank_lending_panel_IJsample',clear 
{txt}
{com}. 
. gen pre_treat_period = 1 if year == 2009 | year==2010 | year==2011 | year==2012 | year==2013 | year==2014
{txt}(12,511 missing values generated)

{com}. gen post_period = year > 2014 & ~missing(year)
{txt}
{com}. 
. bys BankID: gen first = _n == 1
{txt}
{com}. 
. gen lending_amt_all = lending_amt
{txt}
{com}. 
. foreach subs in all coal energy gcel {c -(}
{txt}  2{com}.         di "`subs'"
{txt}  3{com}.         egen lending_`subs'_pre_avg = sum(lending_amt_`subs'/6) if pre_treat_period == 1, by(BankID)
{txt}  4{com}.         bys BankID (lending_`subs'_pre_avg): replace lending_`subs'_pre_avg = lending_`subs'_pre_avg[1]
{txt}  5{com}.         //post period quantities
.         egen lending_`subs'_post_avg = sum(lending_amt_`subs'/7) if post_period == 1, by(BankID)
{txt}  6{com}.         bys BankID (lending_`subs'_post_avg): replace lending_`subs'_post_avg = lending_`subs'_post_avg[1]
{txt}  7{com}.         //share of pre-period and post-period lending activity in coal and broader energy
.         if "`subs'" ~= "all" {c -(}
{txt}  8{com}.                 gen share_`subs'_pre = lending_`subs'_pre_avg/lending_all_pre_avg
{txt}  9{com}.                 gen share_`subs'_post = lending_`subs'_post_avg/lending_all_post_avg
{txt} 10{com}.                 gen delta_share_`subs'_lvl = share_`subs'_post-share_`subs'_pre
{txt} 11{com}.                 gen delta_share_`subs'_pct = share_`subs'_post/share_`subs'_pre-1
{txt} 12{com}.         {c )-}
{txt} 13{com}. {c )-}
all
{txt}(12,511 missing values generated)
(11552 real changes made)
(8,523 missing values generated)
(8347 real changes made)
coal
(12,511 missing values generated)
(11552 real changes made)
(8,523 missing values generated)
(8347 real changes made)
(959 missing values generated)
(176 missing values generated)
(1,037 missing values generated)
(4,246 missing values generated)
energy
(12,511 missing values generated)
(11552 real changes made)
(8,523 missing values generated)
(8347 real changes made)
(959 missing values generated)
(176 missing values generated)
(1,037 missing values generated)
(3,006 missing values generated)
gcel
(12,511 missing values generated)
(11552 real changes made)
(8,523 missing values generated)
(8347 real changes made)
(959 missing values generated)
(176 missing values generated)
(1,037 missing values generated)
(4,708 missing values generated)

{com}. 
. gen coal_share_energy_pre = share_coal_pre/share_energy_pre
{txt}(2,972 missing values generated)

{com}. gen coal_share_energy_post = share_coal_post/share_energy_post
{txt}(836 missing values generated)

{com}. 
. 
. * Part 3: collapse to cross-sectional data at bank level and compare with bank divestment policy strength
. drop lending_amt* pre_treat_period post_period first year 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(13,327 observations deleted)

{com}. duplicates report BankID 

{p 0 4}{txt}Duplicates in terms of {res} BankID{p_end}

{txt}{hline 10}{c TT}{hline 27}
   Copies {c |} Observations       Surplus
{hline 10}{c +}{hline 27}
        1 {c |}          {res}769             0
{txt}{hline 10}{c BT}{hline 27}

{com}. 
. save "../Intermediate/bank_characteristics_IJ.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_characteristics_IJ.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_characteristics_IJ.dta{rm}
saved
{p_end}

{com}. 
. 
. ************************************************************************
. * AGGREGATE THESE TWO AND EXPLORE DETERMINANTS
. ***********************************************************************
. 
. 
. // explore determinants of divestment policy (combine IJ Global and DS data)
. 
. use "../Intermediate/bank_characteristics_DS.dta", clear
{txt}
{com}. drop CAGR* coal_lending_1314 coal_lending_0910 delta_coal_lending_1314_0910
{txt}
{com}. ds BankID BankName Lender_Country, not v(20)
{txt}{col 1}lending_all_pre_avg{col 23}delta_share_coal_lvl{col 45}delta_share_energy~l{col 67}delta_share_gcel_lvl
{col 1}lending_all_post_avg{col 23}delta_share_coal_pct{col 45}delta_share_energy~t{col 67}delta_share_gcel_pct
{col 1}lending_coal_pre_avg{col 23}lending_energy_pre~g{col 45}lending_gcel_pre_avg{col 67}coal_share_energy_~e
{col 1}lending_coal_post_~g{col 23}lending_energy_pos~g{col 45}lending_gcel_post_~g{col 67}coal_share_energy_~t
{col 1}share_coal_pre{col 23}share_energy_pre{col 45}share_gcel_pre
{col 1}share_coal_post{col 23}share_energy_post{col 45}share_gcel_post

{com}. foreach v of var `r(varlist)' {c -(} 
{txt}  2{com}.         ren `v'  `v'_ds
{txt}  3{com}. {c )-} 
{res}{txt}
{com}. 
. tempfile DS_var
{txt}
{com}. save `DS_var'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002q{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Intermediate/bank_characteristics_IJ.dta", clear
{txt}
{com}. ds BankID BankName, not v(20)
{txt}{col 1}lending_all_pre_avg{col 23}delta_share_coal_lvl{col 45}delta_share_energy~l{col 67}delta_share_gcel_lvl
{col 1}lending_all_post_avg{col 23}delta_share_coal_pct{col 45}delta_share_energy~t{col 67}delta_share_gcel_pct
{col 1}lending_coal_pre_avg{col 23}lending_energy_pre~g{col 45}lending_gcel_pre_avg{col 67}coal_share_energy_~e
{col 1}lending_coal_post_~g{col 23}lending_energy_pos~g{col 45}lending_gcel_post_~g{col 67}coal_share_energy_~t
{col 1}share_coal_pre{col 23}share_energy_pre{col 45}share_gcel_pre
{col 1}share_coal_post{col 23}share_energy_post{col 45}share_gcel_post

{com}. foreach v of var `r(varlist)' {c -(} 
{txt}  2{com}.         ren `v'  `v'_ij
{txt}  3{com}. {c )-} 
{res}{txt}
{com}. 
. tempfile IJ_var
{txt}
{com}. save `IJ_var'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002r{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Intermediate/bank_characteristics_DS.dta", clear
{txt}
{com}. drop CAGR* coal_lending_1314 coal_lending_0910 delta_coal_lending_1314_0910
{txt}
{com}. append using "../Intermediate/bank_characteristics_IJ.dta"
{txt}
{com}. append using "../Raw/psedo/non_bank_loans_bank_ids"
{txt}
{com}. 
. collapse (firstnm) Lender_Country (sum) lending*, by(BankID)
{res}{txt}
{com}. 
. foreach subs in coal energy gcel {c -(}
{txt}  2{com}.         gen share_`subs'_pre = lending_`subs'_pre_avg/lending_all_pre_avg
{txt}  3{com}.         gen share_`subs'_post = lending_`subs'_post_avg/lending_all_post_avg
{txt}  4{com}. {c )-}
{txt}(504 missing values generated)
(413 missing values generated)
(504 missing values generated)
(413 missing values generated)
(504 missing values generated)
(413 missing values generated)

{com}. gen coal_share_energy_pre = share_coal_pre/share_energy_pre
{txt}(892 missing values generated)

{com}. gen coal_share_energy_post = share_coal_post/share_energy_post
{txt}(704 missing values generated)

{com}. gen gcel_share_energy_pre =  share_gcel_pre/share_energy_pre
{txt}(892 missing values generated)

{com}. gen gcel_share_energy_post = share_gcel_post/share_energy_post
{txt}(704 missing values generated)

{com}. 
. ds BankID Lender_Country, not v(20)
{txt}{col 1}lending_all_pre_avg{col 23}lending_energy_pos~g{col 45}share_energy_pre{col 67}coal_share_energy_~t
{col 1}lending_all_post_avg{col 23}lending_gcel_pre_avg{col 45}share_energy_post{col 67}gcel_share_energy_~e
{col 1}lending_coal_pre_avg{col 23}lending_gcel_post_~g{col 45}share_gcel_pre{col 67}gcel_share_energy_~t
{col 1}lending_coal_post_~g{col 23}share_coal_pre{col 45}share_gcel_post
{col 1}lending_energy_pre~g{col 23}share_coal_post{col 45}coal_share_energy_~e

{com}. foreach v of var `r(varlist)' {c -(} 
{txt}  2{com}.         ren `v'  `v'_agg
{txt}  3{com}. {c )-} 
{res}{txt}
{com}. 
. merge 1:1 BankID using `IJ_var', nogen keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             895
{txt}{col 9}from master{col 30}{res}             895{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             769{txt}  
{col 5}{hline 41}

{com}. merge 1:1 BankID using `DS_var', nogen keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             371
{txt}{col 9}from master{col 30}{res}             371{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}           1,293{txt}  
{col 5}{hline 41}

{com}. 
. //merge in dealscan data lending growth rate in pre period
. merge 1:1 BankID using ../Intermediate/DS_bankcoalgrowth_estimate, keepusing(_b_year) keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             729
{txt}{col 9}from master{col 30}{res}             729{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             935{txt}  (_merge==3)
{col 5}{hline 41}

{com}. rename _b_year pretrend_bank
{res}{txt}
{com}. drop _merge
{txt}
{com}. 
. save "../Intermediate/bank_characteristics_IJ_DS_aggregated.dta", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_characteristics_IJ_DS_aggregated.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_characteristics_IJ_DS_aggregated.dta{rm}
saved
{p_end}

{com}. 
. 
. **********************************************************************************
. **** NOW LOOK AT THE PORTFOLIO OF COAL BORROWERS OF EACH BANK AND GET DEMOGRAPHICS OF THE PORTFOLIO
. **********************************************************************************
. use ../Intermediate/bank_lending_panel, clear
{txt}
{com}. egen total_coal_pre_agg = total(debt*(year<=2014)), by(BankID)
{txt}
{com}. keep BankID total_coal_pre_agg 
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(204,675 observations deleted)

{com}. gsort -total_coal_pre_agg
{txt}
{com}. tempfile total_coal_pre
{txt}
{com}. save `total_coal_pre'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002s{rm}
saved
as .dta format
{p_end}

{com}. 
. use ../Intermediate/bank_ban_strength_yearly, clear
{txt}
{com}. gen ban_intensity_2030new1 = ban_intensity_new1 if year == 2030
{txt}(300,114 missing values generated)

{com}. 
. //make a cross-sectional version 
. ren ban_intensity_new1 ban_intensitynew1
{res}{txt}
{com}. egen complexity_score = rowtotal(is_sens*)
{txt}
{com}. replace complexity_score = complexity_score/16
{txt}(901 real changes made)

{com}. 
. collapse (firstnm) ban_intensity_* (max) complexity_score projects developers relativethreshold absolutethreshold phaseout  frac_* is_* ban_intensity ban_intensitynew1 has_coded_policy has_coded_policy_new1 first_ban_year first_ban_year_new1 rf_max rf_average rf_phaseout, by(BankID)
{res}{txt}
{com}. 
. foreach var of var ban_intensity* {c -(}
{txt}  2{com}.         sum `var'
{txt}  3{com}.         gen `var'_sd = `var'/`r(sd)'
{txt}  4{com}. {c )-}

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_intens~r {c |}{res}         76           0           0          0          0
{txt}(13,645 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_intens~g {c |}{res}         76           0           0          0          0
{txt}(13,645 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_~ngrowth {c |}{res}         76           0           0          0          0
{txt}(13,645 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_~wgrowth {c |}{res}         76           0           0          0          0
{txt}(13,645 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_i~wshare {c |}{res}         76           0           0          0          0
{txt}(13,645 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_i~hshare {c |}{res}         76           0           0          0          0
{txt}(13,645 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_intens~l {c |}{res}         76           0           0          0          0
{txt}(13,645 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_in~0new1 {c |}{res}         76    .5535714    .3230646          0          1
{txt}(13,569 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_intens~y {c |}{res}         76    .4643931    .2824647          0          1
{txt}(13,569 missing values generated)

    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
ban_in~ynew1 {c |}{res}         76    .5535714    .3230646          0          1
{txt}(13,569 missing values generated)

{com}. 
. //merge in bank characteristics
. merge 1:1 BankID using ../Intermediate/bank_characteristics_IJ_DS_aggregated.dta, nogen
{res}{txt}{p 0 7 2}
(variable
{bf:BankID} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          11,981
{txt}{col 9}from master{col 30}{res}          11,981{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}           1,664{txt}  
{col 5}{hline 41}

{com}. merge 1:1 BankID using ../Raw/Bank_Sample/Bank_Country.dta, nogen keep(1 3) keepusing(Region)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           1,133
{txt}{col 9}from master{col 30}{res}           1,133{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}          12,512{txt}  
{col 5}{hline 41}

{com}. gen Continent = "Asia" if Region == "Asia"
{txt}(10,519 missing values generated)

{com}. replace Continent = "North America" if Region == "North America"
{txt}variable {bf}{res}Continent{sf}{txt} was {bf}{res}str4{sf}{txt} now {bf}{res}str13{sf}
{txt}(6,375 real changes made)

{com}. replace Continent = "Europe" if Region == "Europe"
{txt}(1,963 real changes made)

{com}. replace Continent = "Others" if missing(Continent)
{txt}(2,181 real changes made)

{com}. encode Continent, gen(nContinent)
{txt}
{com}. 
. gen loglending_pre_agg = log(lending_all_pre_avg_agg)
{txt}(12,485 missing values generated)

{com}. xtile bank_size_deciles = lending_all_pre_avg_agg, n(10)
{txt}
{com}. 
. //merge in bank coal portfolio characteristics
. merge 1:1 BankID using ../Intermediate/bank_coal_pretrends, keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          12,977
{txt}{col 9}from master{col 30}{res}          12,977{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             668{txt}  (_merge==3)
{col 5}{hline 41}

{com}. gen has_bankcoal_pretrends = _merge == 3
{txt}
{com}. drop _merge
{txt}
{com}. 
. //Merge in Esg Ratings
. merge 1:m BankID using "../Raw/psedo/esg_banks_with_bans", nogen keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          13,439
{txt}{col 9}from master{col 30}{res}          13,439{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}             206{txt}  
{col 5}{hline 41}

{com}. 
. //merge in coal borrowing in pre period
. merge 1:1 BankID using `total_coal_pre', nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               0
{txt}{col 5}Matched{col 30}{res}          13,645{txt}  
{col 5}{hline 41}

{com}. gen bigcoal = total_coal_pre_agg >= 1e3
{txt}
{com}. gen sample_big = bigcoal == 1
{txt}
{com}. gen ban_intensity_2030_comb_sd = ban_intensity_2030new1_sd
{txt}(13,569 missing values generated)

{com}. replace ban_intensity_2030_comb_sd = 0 if missing(ban_intensity_2030new1_sd)
{txt}(13,569 real changes made)

{com}. rename ban_intensity_2030_comb_sd ban_intensity_2030
{res}{txt}
{com}. gen lending_gcel_total_avg_agg = (6/13)*lending_gcel_pre_avg_agg + (7/13)*lending_gcel_post_avg_agg
{txt}(11,981 missing values generated)

{com}. 
. label var lending_gcel_total_avg_agg "Coal lending average volume"
{txt}
{com}. label var has_coded_policy "Has Coal Policy Old"
{txt}
{com}. label var has_coded_policy_new1 "Has Exit Policy"
{txt}
{com}. label var share_gcel_pre_agg "Coal Share of Lending"
{txt}
{com}. label var share_energy_pre_agg "Energy Share of Lending"
{txt}
{com}. label var loglending_pre_agg "Bank Size"
{txt}
{com}. label var bank_coal_growth_pre "Bank Coal Financing Growth"
{txt}
{com}. label var _b_bank_year_0913 "Bank Coal Financing Growth"
{txt}
{com}. label var _b_bank_year_0513 "Bank Coal Financing Growth"
{txt}
{com}. label var coalshare "GCEL Borrowers Coal Share"
{txt}
{com}. label var _b_firm_year_l1p "Coal Borrowers' Credit Growth"
{txt}
{com}. label var _b_firm_year_0913 "Coal Borrowers' Credit Growth"
{txt}
{com}. 
. //save file for regressions
. save "../Intermediate/policy_determinants_panel", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/policy_determinants_panel.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/policy_determinants_panel.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. include "../Data_Cleaning/Analysis_Bank_Financing.do" //Prepare Table 4
{txt}
{com}. use ../Intermediate/bank_lending_panel, clear 
{txt}
{com}. drop country 
{txt}
{com}. merge m:1 BankID using ../Raw/Bank_Sample/Bank_Country, keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          18,128
{txt}{col 9}from master{col 30}{res}          18,128{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}         200,192{txt}  
{col 5}{hline 41}

{com}. merge 1:1 BankID year using ../Intermediate/bank_ban_strength_yearly, keepusing(ban_intensity_new1 ban_intensity_initial has_coded_policy active_policy)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         163,740
{txt}{col 9}from master{col 30}{res}          40,935{txt}  (_merge==1)
{col 9}from using{col 30}{res}         122,805{txt}  (_merge==2)

{col 5}Matched{col 30}{res}         177,385{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. gen log_lend = log(debt)
{txt}(336,148 missing values generated)

{com}. gen post15 = year > 2015
{txt}
{com}. sum ban_intensity_new1_max if has_coded_policy == 1 & year == 2020, detail

                   {txt}ban_intensity_new1_max
{hline 61}
      Percentiles      Smallest
 1%    {res}        0              0
{txt} 5%    {res}        0              0
{txt}10%    {res} .1428571              0       {txt}Obs         {res}         76
{txt}25%    {res} .2142857              0       {txt}Sum of wgt. {res}         76

{txt}50%    {res} .5714286                      {txt}Mean          {res} .5159774
                        {txt}Largest       Std. dev.     {res} .3135486
{txt}75%    {res} .7142857              1
{txt}90%    {res}        1              1       {txt}Variance      {res} .0983127
{txt}95%    {res}        1              1       {txt}Skewness      {res}  .030521
{txt}99%    {res}        1              1       {txt}Kurtosis      {res} 1.898252
{txt}
{com}. gen ban_intensity_new1_max_sd = ban_intensity_new1_max/`r(sd)'
{txt}(122,805 missing values generated)

{com}. egen rf_score = max(rf_average), by(BankID)
{txt}
{com}. sum rf_score if has_coded_policy == 1 & year == 2020, detail

                          {txt}rf_score
{hline 61}
      Percentiles      Smallest
 1%    {res}        0              0
{txt} 5%    {res}        0              0
{txt}10%    {res}        0              0       {txt}Obs         {res}         76
{txt}25%    {res}       .9              0       {txt}Sum of wgt. {res}         76

{txt}50%    {res}      1.8                      {txt}Mean          {res} 2.307895
                        {txt}Largest       Std. dev.     {res} 2.034749
{txt}75%    {res}      3.3            6.6
{txt}90%    {res}      5.6            7.2       {txt}Variance      {res} 4.140204
{txt}95%    {res}      6.6            7.4       {txt}Skewness      {res} 1.308569
{txt}99%    {res}      9.8            9.8       {txt}Kurtosis      {res} 4.718106
{txt}
{com}. gen rf_score_sd = rf_score/`r(sd)'
{txt}
{com}. egen rf_phaseout_score = max(rf_phaseout), by(BankID)
{txt}(337,625 missing values generated)

{com}. sum rf_phaseout_score if has_coded_policy == 1 & year == 2020, detail

                      {txt}rf_phaseout_score
{hline 61}
      Percentiles      Smallest
 1%    {res}        0              0
{txt} 5%    {res}        0              0
{txt}10%    {res}        0              0       {txt}Obs         {res}         67
{txt}25%    {res}        0              0       {txt}Sum of wgt. {res}         67

{txt}50%    {res}        0                      {txt}Mean          {res} 1.656716
                        {txt}Largest       Std. dev.     {res} 2.766423
{txt}75%    {res}        3              7
{txt}90%    {res}        7              8       {txt}Variance      {res} 7.653098
{txt}95%    {res}        7              9       {txt}Skewness      {res} 1.485286
{txt}99%    {res}       10             10       {txt}Kurtosis      {res} 3.859179
{txt}
{com}. gen rf_phaseout_score_sd = rf_phaseout_score/`r(sd)'
{txt}(337,625 missing values generated)

{com}. egen complexity_score = rowtotal(is_sens*)
{txt}
{com}. egen complexity_score_max = max(complexity_score), by(BankID)
{txt}
{com}. sum complexity_score_max if has_coded_policy == 1 & year == 2020, detail

                    {txt}complexity_score_max
{hline 61}
      Percentiles      Smallest
 1%    {res}        0              0
{txt} 5%    {res}        1              0
{txt}10%    {res}        1              0       {txt}Obs         {res}         76
{txt}25%    {res}        2              1       {txt}Sum of wgt. {res}         76

{txt}50%    {res}        5                      {txt}Mean          {res}        5
                        {txt}Largest       Std. dev.     {res} 3.115552
{txt}75%    {res}        8             10
{txt}90%    {res}       10             10       {txt}Variance      {res} 9.706667
{txt}95%    {res}       10             10       {txt}Skewness      {res} .2077091
{txt}99%    {res}       12             12       {txt}Kurtosis      {res}   1.9491
{txt}
{com}. gen complexity_score_max_sd = complexity_score_max/`r(sd)'
{txt}
{com}. sum ban_intensity_initial_max if has_coded_policy == 1 & year == 2020, detail

                  {txt}ban_intensity_initial_max
{hline 61}
      Percentiles      Smallest
 1%    {res}        0              0
{txt} 5%    {res}        0              0
{txt}10%    {res} .1428571              0       {txt}Obs         {res}         76
{txt}25%    {res} .1785714              0       {txt}Sum of wgt. {res}         76

{txt}50%    {res}       .5                      {txt}Mean          {res} .4727444
                        {txt}Largest       Std. dev.     {res} .2964569
{txt}75%    {res} .6785714              1
{txt}90%    {res} .9285714              1       {txt}Variance      {res} .0878867
{txt}95%    {res}        1              1       {txt}Skewness      {res} .1457103
{txt}99%    {res}        1              1       {txt}Kurtosis      {res} 2.038151
{txt}
{com}. gen ban_intensity_initial_max_sd = ban_intensity_initial_max/`r(sd)'
{txt}(339,909 missing values generated)

{com}. replace ban_intensity_initial_max_sd = 0 if missing(ban_intensity_initial_max_sd)
{txt}(339,909 real changes made)

{com}. gen yearf = year if ban_intensity_initial > 0 & !missing(ban_intensity_initial)
{txt}(340,253 missing values generated)

{com}. egen active_policy_start_initial = min(yearf), by(BankID)
{txt}(339,300 missing values generated)

{com}. gen active_policy_initial = year >= active_policy_start_initial
{txt}
{com}. 
. 
. label var active_policy                           "$\\mathds{c -(}1{c )-}\\{c -(} \\textrm{c -(}Has Exit Policy{c )-}\\{c )-}_{c -(}b,t{c )-}$"
{txt}
{com}. label var post15                                   "$\\mathds{c -(}1{c )-}\\{c -(}\\textrm{c -(}Year{c )-} \\geq 2015\\{c )-}$"
{txt}
{com}. label var ban_intensity_new1_max_sd               "$\\text{c -(}Max Strength{c )-}_{c -(}b{c )-}$"
{txt}
{com}. label var rf_score_sd                             "$\\text{c -(}Max Strength (RF){c )-}_{c -(}b{c )-}$"
{txt}
{com}. label var rf_phaseout_score_sd                    "$\\text{c -(}Max Strength (RF Phaseout){c )-}_{c -(}b{c )-}$"
{txt}
{com}. label var complexity_score_max_sd                 "$\\text{c -(}Max Strength (Complexity){c )-}_{c -(}b{c )-}$"
{txt}
{com}. label var ban_intensity_initial_max_sd            "$\\text{c -(}Max Strength (Non-Updated){c )-}_{c -(}b{c )-}$"
{txt}
{com}. label var active_policy_initial                    "$\\mathds{c -(}1{c )-}\\{c -(} \\textrm{c -(}Has Exit Policy (Non-Updated){c )-}\\{c )-}_{c -(}b,t{c )-}$"
{txt}
{com}. 
. 
. save "../Intermediate/bank_financing_regressions", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_financing_regressions.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_financing_regressions.dta{rm}
saved
{p_end}

{com}. 
. {txt}
{com}. include "../Data_Cleaning/Analysis_Supply_Chain_Effects.do" //Prepare Table 5
{txt}
{com}. 
. use ../Intermediate/borrower_chars, clear 
{txt}
{com}. kountry Country, from(other) geo(marc)

{txt}{hline 51}
The command has finished.
The new variables are named {com}NAMES_STD {txt}and {com}GEO{txt}.
{hline 51}

{com}. gen Region_borrower = GEO 
{txt}(26 missing values generated)

{com}. tab Region_borrower, sort

{txt}Region_borrow {c |}
           er {c |}      Freq.     Percent        Cum.
{hline 14}{c +}{hline 35}
         Asia {c |}{res}        517       56.88       56.88
{txt}       Europe {c |}{res}        126       13.86       70.74
{txt}North America {c |}{res}        123       13.53       84.27
{txt}  Australasia {c |}{res}         71        7.81       92.08
{txt}       Africa {c |}{res}         47        5.17       97.25
{txt}South America {c |}{res}         20        2.20       99.45
{txt} Indian Ocean {c |}{res}          4        0.44       99.89
{txt}  West Indies {c |}{res}          1        0.11      100.00
{txt}{hline 14}{c +}{hline 35}
        Total {c |}{res}        909      100.00
{txt}
{com}. replace Region_borrower = "Asia" if inlist(Region_borrower,"West Indies", "Indian Ocean","Pacific Ocean")
{txt}(5 real changes made)

{com}. tab Region_borrower, sort 

{txt}Region_borrow {c |}
           er {c |}      Freq.     Percent        Cum.
{hline 14}{c +}{hline 35}
         Asia {c |}{res}        522       57.43       57.43
{txt}       Europe {c |}{res}        126       13.86       71.29
{txt}North America {c |}{res}        123       13.53       84.82
{txt}  Australasia {c |}{res}         71        7.81       92.63
{txt}       Africa {c |}{res}         47        5.17       97.80
{txt}South America {c |}{res}         20        2.20      100.00
{txt}{hline 14}{c +}{hline 35}
        Total {c |}{res}        909      100.00
{txt}
{com}. drop Continent Region Country GEO
{txt}
{com}. rename NAMES_STD Country_borrower
{res}{txt}
{com}. tempfile borrower_chars 
{txt}
{com}. save `borrower_chars'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002t{rm}
saved
as .dta format
{p_end}

{com}. 
. use ../Intermediate/transaction_clean, clear
{txt}
{com}. joinby transaction_id using ../Intermediate/transaction_lender_clean
{txt}
{com}. order transaction_id borrower_id BankID 
{txt}
{com}. drop if missing(BankID)
{txt}(875 observations deleted)

{com}. gen year=yofd(date_trans)
{txt}
{com}. drop if amount_trans_lender_usdm < 0
{txt}(1,507 observations deleted)

{com}. collapse (sum) amount_trans_lender_usdm, by(BankID borrower_id year)
{res}{txt}
{com}. 
. keep if year>2008
{txt}(16,763 observations deleted)

{com}. drop if year == . | year > 2021
{txt}(2,579 observations deleted)

{com}. 
. *merge m:1 BankID using ../Intermediate/bank_cx, keepusing(Region_bank Country_bank) keep(3) nogen
. tempfile obs 
{txt}
{com}. save `obs'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002u{rm}
saved
as .dta format
{p_end}

{com}. 
. //make panel at bank borrower year level
. keep BankID borrower_id
{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(12,035 observations deleted)

{com}. expand 13
{txt}(98,484 observations created)

{com}. bys borrower_id BankID: gen year = 2008+_n
{txt}
{com}. 
. merge 1:1 borrower_id BankID year using `obs'
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}          86,449
{txt}{col 9}from master{col 30}{res}          86,449{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          20,242{txt}  (_merge==3)
{col 5}{hline 41}

{com}. rename amount_trans_lender_usdm borr_fbt
{res}{txt}
{com}. gen post = year > 2014
{txt}
{com}. replace borr_fbt = 0 if missing(borr_fbt)
{txt}(86,449 real changes made)

{com}. gen has_borr_fbt = _merge == 3
{txt}
{com}. drop _merge 
{txt}
{com}. 
. merge m:1 BankID year using ../Intermediate/bank_ban_strength_yearly
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         286,683
{txt}{col 9}from master{col 30}{res}             377{txt}  (_merge==1)
{col 9}from using{col 30}{res}         286,306{txt}  (_merge==2)

{col 5}Matched{col 30}{res}         106,314{txt}  (_merge==3)
{col 5}{hline 41}

{com}. egen ban_intensity_new1_max = max(ban_intensity_new1), by(BankID)
{txt}(349,621 missing values generated)

{com}. drop if _merge == 2
{txt}(286,306 observations deleted)

{com}. drop _merge
{txt}
{com}. 
. merge m:1 borrower_id year using ../Intermediate/analysis_panel_firmyear, keepusing(share Country country_i coal_industry_mining coal_industry_power median_assets_mean) keep(1 3) nogen
{res}{txt}{p 0 7 2}
(variable
{bf:borrower_id} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}             806
{txt}{col 9}from master{col 30}{res}             806{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}         105,885{txt}  
{col 5}{hline 41}

{com}. merge m:1 borrower_id using `borrower_chars', keepusing(Country_borrower Region_borrower) keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           2,587
{txt}{col 9}from master{col 30}{res}           2,587{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}         104,104{txt}  
{col 5}{hline 41}

{com}. 
. 
. 
. replace ban_intensity_new1 = 0 if missing(ban_intensity_new1)
{txt}(64,038 real changes made)

{com}. gen log_1p_borr_fbt = log(1+borr_fbt)
{txt}
{com}. 
. gen highshare = share > 0.5562 if ~missing(share)
{txt}(11,882 missing values generated)

{com}. 
. 
. *Labels
. label var ban_intensity_new1 "$\text{c -(}Exit Policy Strength{c )-}_{c -(}b,t{c )-}$"
{txt}
{com}. label define medcoal 0 "$\text{c -(}Low Coal Share{c )-}_{c -(}f{c )-}$" 1 "$\text{c -(}High Coal Share{c )-}_{c -(}f{c )-}$", replace
{txt}
{com}. label values highshare medcoal
{txt}
{com}. label values median_assets_mean medassets
{txt}
{com}. 
. save "../Intermediate/bank_supply_chain_regressions", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/bank_supply_chain_regressions.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/bank_supply_chain_regressions.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. //Table 6-8 needs Build_Panel_Firm_Year, which is in build files
. //Table 9 Panel A needed Build_Planet_Year_Panel, which is in build files
. include Main_Tables.do
{txt}
{com}. 
. 
. ********************************************************************************
. ********************************************************************************
. * This Do File, replicates every Non-Summary Table in the Main Article
. ********************************************************************************
. ********************************************************************************
. 
. 
. 
. ********************************************************************************
. ********************************************************************************
. * Setup
. ********************************************************************************
. ********************************************************************************
. include Fixed_Effects.do
{txt}
{com}. 
. 
. ********************************************************************************
. * Fixed Effects
. ********************************************************************************
. 
. capture program drop FE1                
{txt}
{com}. program define FE1
{txt}  1{com}. estadd local borrower_year "Yes", replace
{txt}  2{com}. estadd local bank "Yes", replace
{txt}  3{com}. end 
{txt}
{com}. 
. 
. capture program drop FE2 
{txt}
{com}. program define FE2
{txt}  1{com}.         estadd local borrower "Yes", replace
{txt}  2{com}.         estadd local cy "Yes", replace
{txt}  3{com}.                 estadd local sy "Yes", replace
{txt}  4{com}. end 
{txt}
{com}. 
. 
. capture program drop FE3 
{txt}
{com}. program define FE3
{txt}  1{com}.         estadd local borrower "Yes", replace
{txt}  2{com}.         estadd local y "Yes", replace
{txt}  3{com}.         estadd local cy "Yes", replace
{txt}  4{com}.         estadd local sy "Yes", replace
{txt}  5{com}. end 
{txt}
{com}. 
. capture program drop FE3nosy
{txt}
{com}. program define FE3nosy
{txt}  1{com}.         estadd local borrower "Yes", replace
{txt}  2{com}.                 estadd local y "Yes", replace
{txt}  3{com}.         estadd local cy "Yes", replace
{txt}  4{com}.                 estadd local sy "No", replace
{txt}  5{com}. end
{txt}
{com}. 
. capture program drop FE4
{txt}
{com}. program define FE4
{txt}  1{com}.         estadd local borrower "Yes", replace
{txt}  2{com}.         estadd local y "Yes", replace
{txt}  3{com}.         estadd local cy "No", replace
{txt}  4{com}.         estadd local sy "No", replace
{txt}  5{com}. end 
{txt}
{com}. 
. 
. 
. capture program drop FE_cy                
{txt}
{com}. program define FE_cy
{txt}  1{com}.         estadd local country "Yes", replace
{txt}  2{com}. end 
{txt}
{com}. 
. capture program drop FE_cyad                
{txt}
{com}. program define FE_cyad
{txt}  1{com}.         estadd local country "Yes", replace
{txt}  2{com}.         estadd local timetrend "Yes", replace
{txt}  3{com}. end 
{txt}
{com}. 
. 
. {txt}
{com}. 
. 
. ********************************************************************************
. ********************************************************************************
. * Table 3: Determinants of Bank Exit Policy Adoption and Strength
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/policy_determinants_panel", clear 
{txt}
{com}. keep if sample_big & share_gcel_pre_agg <= 1
{txt}(12,923 observations deleted)

{com}. 
. eststo clear
{txt}
{com}. 
. reghdfe ban_intensity_2030  loglending_pre_agg, ///
>     noabs vce(robust)
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 1 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       722
{txt}Absorbing 1 HDFE group{col 51}F({res}   1{txt},{res}    720{txt}){col 67}= {res}     64.50
{txt}{col 51}Prob > F{col 67}= {res}    0.0000
{txt}{col 51}R-squared{col 67}= {res}    0.1561
{txt}{col 51}Adj R-squared{col 67}= {res}    0.1550
{txt}{col 51}Within R-sq.{col 67}= {res}    0.1561
{txt}{col 51}Root MSE{col 67}= {res}    0.5484

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}ban_intensity_2030{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
loglending_pre_agg {c |}{col 20}{res}{space 2} .0927392{col 32}{space 2} .0115473{col 43}{space 1}    8.03{col 52}{space 3}0.000{col 60}{space 4} .0700688{col 73}{space 3} .1154095
{txt}{space 13}_cons {c |}{col 20}{res}{space 2}-.9880438{col 32}{space 2} .1280399{col 43}{space 1}   -7.72{col 52}{space 3}0.000{col 60}{space 4} -1.23942{col 73}{space 3}-.7366677
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe ban_intensity_2030  loglending_pre_agg share_gcel_pre_agg, ///
>     noabs vce(robust)
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 1 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       722
{txt}Absorbing 1 HDFE group{col 51}F({res}   2{txt},{res}    719{txt}){col 67}= {res}     34.17
{txt}{col 51}Prob > F{col 67}= {res}    0.0000
{txt}{col 51}R-squared{col 67}= {res}    0.1704
{txt}{col 51}Adj R-squared{col 67}= {res}    0.1681
{txt}{col 51}Within R-sq.{col 67}= {res}    0.1704
{txt}{col 51}Root MSE{col 67}= {res}    0.5441

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}ban_intensity_2030{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
loglending_pre_agg {c |}{col 20}{res}{space 2} .1128148{col 32}{space 2} .0143864{col 43}{space 1}    7.84{col 52}{space 3}0.000{col 60}{space 4} .0845704{col 73}{space 3} .1410592
{txt}share_gcel_pre_agg {c |}{col 20}{res}{space 2} .3601332{col 32}{space 2} .0648258{col 43}{space 1}    5.56{col 52}{space 3}0.000{col 60}{space 4} .2328627{col 73}{space 3} .4874037
{txt}{space 13}_cons {c |}{col 20}{res}{space 2}-1.292136{col 32}{space 2} .1733791{col 43}{space 1}   -7.45{col 52}{space 3}0.000{col 60}{space 4}-1.632525{col 73}{space 3}-.9517459
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe ban_intensity_2030  loglending_pre_agg share_gcel_pre_agg   ///
>     _b_bank_year_0913 _b_firm_year_0913 , ///
>     noabs vce(robust)
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 1 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       612
{txt}Absorbing 1 HDFE group{col 51}F({res}   4{txt},{res}    607{txt}){col 67}= {res}     17.67
{txt}{col 51}Prob > F{col 67}= {res}    0.0000
{txt}{col 51}R-squared{col 67}= {res}    0.1854
{txt}{col 51}Adj R-squared{col 67}= {res}    0.1800
{txt}{col 51}Within R-sq.{col 67}= {res}    0.1854
{txt}{col 51}Root MSE{col 67}= {res}    0.5797

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}ban_intensity_2030{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
loglending_pre_agg {c |}{col 20}{res}{space 2} .1346013{col 32}{space 2} .0170635{col 43}{space 1}    7.89{col 52}{space 3}0.000{col 60}{space 4} .1010907{col 73}{space 3} .1681119
{txt}share_gcel_pre_agg {c |}{col 20}{res}{space 2} .5053729{col 32}{space 2} .0867132{col 43}{space 1}    5.83{col 52}{space 3}0.000{col 60}{space 4} .3350786{col 73}{space 3} .6756672
{txt}{space 1}_b_bank_year_0913 {c |}{col 20}{res}{space 2} .0064242{col 32}{space 2} .0121342{col 43}{space 1}    0.53{col 52}{space 3}0.597{col 60}{space 4} -.017406{col 73}{space 3} .0302544
{txt}{space 1}_b_firm_year_0913 {c |}{col 20}{res}{space 2} .0066133{col 32}{space 2}  .014811{col 43}{space 1}    0.45{col 52}{space 3}0.655{col 60}{space 4}-.0224737{col 73}{space 3} .0357003
{txt}{space 13}_cons {c |}{col 20}{res}{space 2}-1.606173{col 32}{space 2} .2135588{col 43}{space 1}   -7.52{col 52}{space 3}0.000{col 60}{space 4}-2.025577{col 73}{space 3}-1.186769
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe ban_intensity_2030  loglending_pre_agg share_gcel_pre_agg  ///
>     _b_bank_year_0913 _b_firm_year_0913 indus_esg_2020 enviro_esg_2020, ///
>     noabs vce(robust)
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 1 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       182
{txt}Absorbing 1 HDFE group{col 51}F({res}   6{txt},{res}    175{txt}){col 67}= {res}      7.74
{txt}{col 51}Prob > F{col 67}= {res}    0.0000
{txt}{col 51}R-squared{col 67}= {res}    0.1697
{txt}{col 51}Adj R-squared{col 67}= {res}    0.1413
{txt}{col 51}Within R-sq.{col 67}= {res}    0.1697
{txt}{col 51}Root MSE{col 67}= {res}    0.9614

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}ban_intensity_2030{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
loglending_pre_agg {c |}{col 20}{res}{space 2} .1870096{col 32}{space 2} .0361152{col 43}{space 1}    5.18{col 52}{space 3}0.000{col 60}{space 4} .1157323{col 73}{space 3}  .258287
{txt}share_gcel_pre_agg {c |}{col 20}{res}{space 2}-.3030706{col 32}{space 2} .4480343{col 43}{space 1}   -0.68{col 52}{space 3}0.500{col 60}{space 4}-1.187317{col 73}{space 3} .5811755
{txt}{space 1}_b_bank_year_0913 {c |}{col 20}{res}{space 2} .0017934{col 32}{space 2}  .065664{col 43}{space 1}    0.03{col 52}{space 3}0.978{col 60}{space 4}-.1278019{col 73}{space 3} .1313887
{txt}{space 1}_b_firm_year_0913 {c |}{col 20}{res}{space 2} .0179531{col 32}{space 2} .0705942{col 43}{space 1}    0.25{col 52}{space 3}0.800{col 60}{space 4}-.1213725{col 73}{space 3} .1572787
{txt}{space 4}indus_esg_2020 {c |}{col 20}{res}{space 2}-.0126986{col 32}{space 2} .0282988{col 43}{space 1}   -0.45{col 52}{space 3}0.654{col 60}{space 4}-.0685494{col 73}{space 3} .0431523
{txt}{space 3}enviro_esg_2020 {c |}{col 20}{res}{space 2}-.0205921{col 32}{space 2} .0253549{col 43}{space 1}   -0.81{col 52}{space 3}0.418{col 60}{space 4}-.0706329{col 73}{space 3} .0294487
{txt}{space 13}_cons {c |}{col 20}{res}{space 2}-1.909143{col 32}{space 2} .5528696{col 43}{space 1}   -3.45{col 52}{space 3}0.001{col 60}{space 4}-3.000293{col 73}{space 3}-.8179926
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe ban_intensity_2030  loglending_pre_agg share_gcel_pre_agg  ///
>     _b_bank_year_0913 _b_firm_year_0913 indus_esg_2020 enviro_esg_2020 ib4.nContinent, ///
>     noabs vce(robust)
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 1 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       182
{txt}Absorbing 1 HDFE group{col 51}F({res}   9{txt},{res}    172{txt}){col 67}= {res}     14.29
{txt}{col 51}Prob > F{col 67}= {res}    0.0000
{txt}{col 51}R-squared{col 67}= {res}    0.4160
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3854
{txt}{col 51}Within R-sq.{col 67}= {res}    0.4160
{txt}{col 51}Root MSE{col 67}= {res}    0.8133

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}ban_intensity_2030{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
loglending_pre_agg {c |}{col 20}{res}{space 2} .1273643{col 32}{space 2} .0448272{col 43}{space 1}    2.84{col 52}{space 3}0.005{col 60}{space 4}  .038882{col 73}{space 3} .2158466
{txt}share_gcel_pre_agg {c |}{col 20}{res}{space 2} .2149733{col 32}{space 2} .3796476{col 43}{space 1}    0.57{col 52}{space 3}0.572{col 60}{space 4}-.5343948{col 73}{space 3} .9643415
{txt}{space 1}_b_bank_year_0913 {c |}{col 20}{res}{space 2} .0315866{col 32}{space 2} .0507969{col 43}{space 1}    0.62{col 52}{space 3}0.535{col 60}{space 4} -.068679{col 73}{space 3} .1318522
{txt}{space 1}_b_firm_year_0913 {c |}{col 20}{res}{space 2} .0438407{col 32}{space 2} .0617988{col 43}{space 1}    0.71{col 52}{space 3}0.479{col 60}{space 4} -.078141{col 73}{space 3} .1658223
{txt}{space 4}indus_esg_2020 {c |}{col 20}{res}{space 2}-.0046329{col 32}{space 2} .0237841{col 43}{space 1}   -0.19{col 52}{space 3}0.846{col 60}{space 4}-.0515791{col 73}{space 3} .0423133
{txt}{space 3}enviro_esg_2020 {c |}{col 20}{res}{space 2}-.0388924{col 32}{space 2} .0234354{col 43}{space 1}   -1.66{col 52}{space 3}0.099{col 60}{space 4}-.0851504{col 73}{space 3} .0073655
{txt}{space 18} {c |}
{space 8}nContinent {c |}
{space 13}Asia  {c |}{col 20}{res}{space 2}-.3343669{col 32}{space 2}  .181909{col 43}{space 1}   -1.84{col 52}{space 3}0.068{col 60}{space 4}-.6934284{col 73}{space 3} .0246945
{txt}{space 11}Europe  {c |}{col 20}{res}{space 2} 1.012798{col 32}{space 2}  .291053{col 43}{space 1}    3.48{col 52}{space 3}0.001{col 60}{space 4} .4383026{col 73}{space 3} 1.587294
{txt}{space 4}North America  {c |}{col 20}{res}{space 2} -.145905{col 32}{space 2} .3304032{col 43}{space 1}   -0.44{col 52}{space 3}0.659{col 60}{space 4}-.7980721{col 73}{space 3} .5062621
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-1.086584{col 32}{space 2} .5929213{col 43}{space 1}   -1.83{col 52}{space 3}0.069{col 60}{space 4}-2.256923{col 73}{space 3} .0837553
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. 
. esttab, stats(r2 N) nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers label  nomtitles drop(4.nContinent)
{res}
{txt}{hline 100}
{txt}                              (1)             (2)             (3)             (4)             (5)   
{txt}{hline 100}
{txt}Bank Size           {res}       0.0927***        0.113***        0.135***        0.187***        0.127***{txt}
                    {res} {ralign 12:{txt:(}8.03{txt:)}}    {ralign 12:{txt:(}7.84{txt:)}}    {ralign 12:{txt:(}7.89{txt:)}}    {ralign 12:{txt:(}5.18{txt:)}}    {ralign 12:{txt:(}2.84{txt:)}}   {txt}

{txt}Coal Share of Lend~g{res}                        0.360***        0.505***       -0.303           0.215   {txt}
                    {res}                 {ralign 12:{txt:(}5.56{txt:)}}    {ralign 12:{txt:(}5.83{txt:)}}    {ralign 12:{txt:(}-0.68{txt:)}}    {ralign 12:{txt:(}0.57{txt:)}}   {txt}

{txt}Bank Coal Financin~h{res}                                      0.00642         0.00179          0.0316   {txt}
                    {res}                                 {ralign 12:{txt:(}0.53{txt:)}}    {ralign 12:{txt:(}0.03{txt:)}}    {ralign 12:{txt:(}0.62{txt:)}}   {txt}

{txt}Coal Borrowers' Cr~h{res}                                      0.00661          0.0180          0.0438   {txt}
                    {res}                                 {ralign 12:{txt:(}0.45{txt:)}}    {ralign 12:{txt:(}0.25{txt:)}}    {ralign 12:{txt:(}0.71{txt:)}}   {txt}

{txt}2020 indus_esg_     {res}                                                      -0.0127        -0.00463   {txt}
                    {res}                                                 {ralign 12:{txt:(}-0.45{txt:)}}    {ralign 12:{txt:(}-0.19{txt:)}}   {txt}

{txt}2020 enviro_esg_    {res}                                                      -0.0206         -0.0389*  {txt}
                    {res}                                                 {ralign 12:{txt:(}-0.81{txt:)}}    {ralign 12:{txt:(}-1.66{txt:)}}   {txt}

{txt}Asia                {res}                                                                       -0.334*  {txt}
                    {res}                                                                 {ralign 12:{txt:(}-1.84{txt:)}}   {txt}

{txt}Europe              {res}                                                                        1.013***{txt}
                    {res}                                                                 {ralign 12:{txt:(}3.48{txt:)}}   {txt}

{txt}North America       {res}                                                                       -0.146   {txt}
                    {res}                                                                 {ralign 12:{txt:(}-0.44{txt:)}}   {txt}

{txt}Constant            {res}       -0.988***       -1.292***       -1.606***       -1.909***       -1.087*  {txt}
                    {res} {ralign 12:{txt:(}-7.72{txt:)}}    {ralign 12:{txt:(}-7.45{txt:)}}    {ralign 12:{txt:(}-7.52{txt:)}}    {ralign 12:{txt:(}-3.45{txt:)}}    {ralign 12:{txt:(}-1.83{txt:)}}   {txt}
{txt}{hline 100}
{txt}r2                  {res}        0.156           0.170           0.185           0.170           0.416   {txt}
{txt}N                   {res}          722             722             612             182             182   {txt}
{txt}{hline 100}

{com}. esttab using "../Results/Tables/Table_3.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 r2 nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers label interaction(" $\times$ ") drop(4.nContinent) nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule"  ///
>                                                               "& \multicolumn{c -(}5{c )-}{c -(}c{c )-}{c -(}Policy Existence and Strength{c )-}\\" ///
>                                                               "\cmidrule(r{c -(}2pt{c )-}){c -(}2-6{c )-}") 
{res}{txt}(output written to {browse  `"../Results/Tables/Table_3.tex"'})

{com}. 
.                                                                                                                           
. ********************************************************************************
. ********************************************************************************
. * Table 4: Bank Financing of Coal Activity
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/bank_financing_regressions", clear
{txt}
{com}. keep if has_coded_policy==1 & year>=2006
{txt}(339,225 observations deleted)

{com}. 
. eststo clear
{txt}
{com}. 
. reghdfe log_lend active_policy, ///
>     absorb(year BankID) vce(robust)
{res}{txt}(dropped 1 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       962
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    875{txt}){col 67}= {res}      9.52
{txt}{col 51}Prob > F{col 67}= {res}    0.0021
{txt}{col 51}R-squared{col 67}= {res}    0.7292
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7026
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0087
{txt}{col 51}Root MSE{col 67}= {res}    0.8973

{txt}{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}    Robust
{col 1}     log_lend{col 15}{c |} Coefficient{col 27}  std. err.{col 39}      t{col 47}   P>|t|{col 55}     [95% con{col 68}f. interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
active_policy {c |}{col 15}{res}{space 2}-.3591716{col 27}{space 2} .1164031{col 38}{space 1}   -3.09{col 47}{space 3}0.002{col 55}{space 4}-.5876335{col 68}{space 3}-.1307096
{txt}{space 8}_cons {c |}{col 15}{res}{space 2} 12.46107{col 27}{space 2} .0336736{col 38}{space 1}  370.05{col 47}{space 3}0.000{col 55}{space 4} 12.39498{col 68}{space 3} 12.52716
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        year{col 14}{c |}{space 1}       16{col 27}{space 1}        0{col 39}{result}{space 1}       16{col 53}{text} {col 54}{c |}
{res}{col 1}{text}      BankID{col 14}{c |}{space 1}       71{col 27}{space 1}        1{col 39}{result}{space 1}       70{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe log_lend active_policy c.post15#c.ban_intensity_new1_max_sd, ///
>     absorb(year BankID) vce(robust)
{res}{txt}(dropped 1 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       962
{txt}Absorbing 2 HDFE groups{col 51}F({res}   2{txt},{res}    874{txt}){col 67}= {res}      5.01
{txt}{col 51}Prob > F{col 67}= {res}    0.0068
{txt}{col 51}R-squared{col 67}= {res}    0.7294
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7025
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0094
{txt}{col 51}Root MSE{col 67}= {res}    0.8975

{txt}{hline 28}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 29}{c |}{col 41}    Robust
{col 1}                   log_lend{col 29}{c |} Coefficient{col 41}  std. err.{col 53}      t{col 61}   P>|t|{col 69}     [95% con{col 82}f. interval]
{hline 28}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 14}active_policy {c |}{col 29}{res}{space 2}-.3362336{col 41}{space 2} .1181664{col 52}{space 1}   -2.85{col 61}{space 3}0.005{col 69}{space 4}-.5681567{col 82}{space 3}-.1043104
{txt}{space 27} {c |}
{space 19}c.post15#{c |}
c.ban_intensity_new1_max_sd {c |}{col 29}{res}{space 2}-.0490845{col 41}{space 2} .0587911{col 52}{space 1}   -0.83{col 61}{space 3}0.404{col 69}{space 4}-.1644727{col 82}{space 3} .0663037
{txt}{space 27} {c |}
{space 22}_cons {c |}{col 29}{res}{space 2} 12.48702{col 41}{space 2} .0466426{col 52}{space 1}  267.72{col 61}{space 3}0.000{col 69}{space 4} 12.39548{col 82}{space 3} 12.57857
{txt}{hline 28}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        year{col 14}{c |}{space 1}       16{col 27}{space 1}        0{col 39}{result}{space 1}       16{col 53}{text} {col 54}{c |}
{res}{col 1}{text}      BankID{col 14}{c |}{space 1}       71{col 27}{space 1}        1{col 39}{result}{space 1}       70{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe log_lend active_policy c.post15#c.rf_score_sd, ///
>     absorb(year BankID) vce(robust)
{res}{txt}(dropped 1 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       962
{txt}Absorbing 2 HDFE groups{col 51}F({res}   2{txt},{res}    874{txt}){col 67}= {res}      8.34
{txt}{col 51}Prob > F{col 67}= {res}    0.0003
{txt}{col 51}R-squared{col 67}= {res}    0.7325
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7058
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0204
{txt}{col 51}Root MSE{col 67}= {res}    0.8925

{txt}{hline 23}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 24}{c |}{col 36}    Robust
{col 1}              log_lend{col 24}{c |} Coefficient{col 36}  std. err.{col 48}      t{col 56}   P>|t|{col 64}     [95% con{col 77}f. interval]
{hline 23}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}active_policy {c |}{col 24}{res}{space 2}-.2774987{col 36}{space 2} .1150903{col 47}{space 1}   -2.41{col 56}{space 3}0.016{col 64}{space 4}-.5033843{col 77}{space 3}-.0516131
{txt}{space 22} {c |}
c.post15#c.rf_score_sd {c |}{col 24}{res}{space 2}-.2113105{col 36}{space 2} .0694884{col 47}{space 1}   -3.04{col 56}{space 3}0.002{col 64}{space 4}-.3476941{col 77}{space 3} -.074927
{txt}{space 22} {c |}
{space 17}_cons {c |}{col 24}{res}{space 2}  12.5395{col 36}{space 2} .0419655{col 47}{space 1}  298.81{col 56}{space 3}0.000{col 64}{space 4} 12.45714{col 77}{space 3} 12.62187
{txt}{hline 23}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        year{col 14}{c |}{space 1}       16{col 27}{space 1}        0{col 39}{result}{space 1}       16{col 53}{text} {col 54}{c |}
{res}{col 1}{text}      BankID{col 14}{c |}{space 1}       71{col 27}{space 1}        1{col 39}{result}{space 1}       70{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe log_lend active_policy c.post15#c.rf_phaseout_score_sd, ///
>     absorb(year BankID) vce(robust)
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       868
{txt}Absorbing 2 HDFE groups{col 51}F({res}   2{txt},{res}    786{txt}){col 67}= {res}      6.22
{txt}{col 51}Prob > F{col 67}= {res}    0.0021
{txt}{col 51}R-squared{col 67}= {res}    0.7342
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7068
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0147
{txt}{col 51}Root MSE{col 67}= {res}    0.9085

{txt}{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_lend{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 18}active_policy {c |}{col 33}{res}{space 2} -.279066{col 45}{space 2} .1226862{col 56}{space 1}   -2.27{col 65}{space 3}0.023{col 73}{space 4}-.5198974{col 86}{space 3}-.0382347
{txt}{space 31} {c |}
c.post15#c.rf_phaseout_score_sd {c |}{col 33}{res}{space 2}-.1593182{col 45}{space 2} .0621475{col 56}{space 1}   -2.56{col 65}{space 3}0.011{col 73}{space 4}-.2813128{col 86}{space 3}-.0373235
{txt}{space 31} {c |}
{space 26}_cons {c |}{col 33}{res}{space 2} 12.41921{col 45}{space 2} .0376381{col 56}{space 1}  329.96{col 65}{space 3}0.000{col 73}{space 4} 12.34532{col 86}{space 3} 12.49309
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        year{col 14}{c |}{space 1}       16{col 27}{space 1}        0{col 39}{result}{space 1}       16{col 53}{text} {col 54}{c |}
{res}{col 1}{text}      BankID{col 14}{c |}{space 1}       65{col 27}{space 1}        1{col 39}{result}{space 1}       64{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe log_lend active_policy c.post15#c.complexity_score_max_sd, ///
>     absorb(year BankID) vce(robust)
{res}{txt}(dropped 1 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       962
{txt}Absorbing 2 HDFE groups{col 51}F({res}   2{txt},{res}    874{txt}){col 67}= {res}     11.29
{txt}{col 51}Prob > F{col 67}= {res}    0.0000
{txt}{col 51}R-squared{col 67}= {res}    0.7339
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7074
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0256
{txt}{col 51}Root MSE{col 67}= {res}    0.8901

{txt}{hline 35}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 36}{c |}{col 48}    Robust
{col 1}                          log_lend{col 36}{c |} Coefficient{col 48}  std. err.{col 60}      t{col 68}   P>|t|{col 76}     [95% con{col 89}f. interval]
{hline 35}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 21}active_policy {c |}{col 36}{res}{space 2}-.2953067{col 48}{space 2} .1128002{col 59}{space 1}   -2.62{col 68}{space 3}0.009{col 76}{space 4}-.5166977{col 89}{space 3}-.0739157
{txt}{space 34} {c |}
c.post15#c.complexity_score_max_sd {c |}{col 36}{res}{space 2}-.2352322{col 48}{space 2} .0599203{col 59}{space 1}   -3.93{col 68}{space 3}0.000{col 76}{space 4}-.3528367{col 89}{space 3}-.1176277
{txt}{space 34} {c |}
{space 29}_cons {c |}{col 36}{res}{space 2} 12.60529{col 48}{space 2} .0477483{col 59}{space 1}  263.99{col 68}{space 3}0.000{col 76}{space 4} 12.51157{col 89}{space 3}   12.699
{txt}{hline 35}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        year{col 14}{c |}{space 1}       16{col 27}{space 1}        0{col 39}{result}{space 1}       16{col 53}{text} {col 54}{c |}
{res}{col 1}{text}      BankID{col 14}{c |}{space 1}       71{col 27}{space 1}        1{col 39}{result}{space 1}       70{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. reghdfe log_lend active_policy_initial c.post15#c.ban_intensity_initial_max_sd, ///
>     absorb(year BankID) vce(robust)
{res}{txt}(dropped 1 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}       962
{txt}Absorbing 2 HDFE groups{col 51}F({res}   2{txt},{res}    874{txt}){col 67}= {res}      4.62
{txt}{col 51}Prob > F{col 67}= {res}    0.0101
{txt}{col 51}R-squared{col 67}= {res}    0.7292
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7022
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0084
{txt}{col 51}Root MSE{col 67}= {res}    0.8980

{txt}{hline 31}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 32}{c |}{col 44}    Robust
{col 1}                      log_lend{col 32}{c |} Coefficient{col 44}  std. err.{col 56}      t{col 64}   P>|t|{col 72}     [95% con{col 85}f. interval]
{hline 31}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}active_policy_initial {c |}{col 32}{res}{space 2} -.350041{col 44}{space 2} .1182176{col 55}{space 1}   -2.96{col 64}{space 3}0.003{col 72}{space 4}-.5820645{col 85}{space 3}-.1180175
{txt}{space 30} {c |}
{space 22}c.post15#{c |}
c.ban_intensity_initial_max_sd {c |}{col 32}{res}{space 2}-.0027823{col 44}{space 2} .0595166{col 55}{space 1}   -0.05{col 64}{space 3}0.963{col 72}{space 4}-.1195945{col 85}{space 3} .1140298
{txt}{space 30} {c |}
{space 25}_cons {c |}{col 32}{res}{space 2} 12.45695{col 44}{space 2} .0458853{col 55}{space 1}  271.48{col 64}{space 3}0.000{col 72}{space 4}  12.3669{col 85}{space 3} 12.54701
{txt}{hline 31}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        year{col 14}{c |}{space 1}       16{col 27}{space 1}        0{col 39}{result}{space 1}       16{col 53}{text} {col 54}{c |}
{res}{col 1}{text}      BankID{col 14}{c |}{space 1}       71{col 27}{space 1}        1{col 39}{result}{space 1}       70{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est6{txt} stored)

{com}. 
. esttab, label starlevels(* .10 ** .05 *** .01) se(%8.3f) ///
>     order(active_policy active_policy_initial)
{res}
{txt}{hline 116}
{txt}                              (1)             (2)             (3)             (4)             (5)             (6)   
{txt}                         log_lend        log_lend        log_lend        log_lend        log_lend        log_lend   
{txt}{hline 116}
{txt}$\\mathds{1}\\{ \\~i{res}       -0.359***       -0.336***       -0.277**        -0.279**        -0.295***                {txt}
                    {res} {ralign 12:{txt:(}0.116{txt:)}}    {ralign 12:{txt:(}0.118{txt:)}}    {ralign 12:{txt:(}0.115{txt:)}}    {ralign 12:{txt:(}0.123{txt:)}}    {ralign 12:{txt:(}0.113{txt:)}}                   {txt}

{txt}$\\mathds{1}\\{ \\~i{res}                                                                                       -0.350***{txt}
                    {res}                                                                                 {ralign 12:{txt:(}0.118{txt:)}}   {txt}

{txt}$\\mathds{1}\\{\\t~\{res}                      -0.0491                                                                   {txt}
                    {res}                 {ralign 12:{txt:(}0.059{txt:)}}                                                                   {txt}

{txt}$\\mathds{1}\\{\\t~\{res}                                       -0.211***                                                {txt}
                    {res}                                 {ralign 12:{txt:(}0.069{txt:)}}                                                   {txt}

{txt}$\\mathds{1}\\{\\t~\{res}                                                       -0.159**                                 {txt}
                    {res}                                                 {ralign 12:{txt:(}0.062{txt:)}}                                   {txt}

{txt}$\\mathds{1}\\{\\t~\{res}                                                                       -0.235***                {txt}
                    {res}                                                                 {ralign 12:{txt:(}0.060{txt:)}}                   {txt}

{txt}$\\mathds{1}\\{\\t~\{res}                                                                                     -0.00278   {txt}
                    {res}                                                                                 {ralign 12:{txt:(}0.060{txt:)}}   {txt}

{txt}Constant            {res}        12.46***        12.49***        12.54***        12.42***        12.61***        12.46***{txt}
                    {res} {ralign 12:{txt:(}0.034{txt:)}}    {ralign 12:{txt:(}0.047{txt:)}}    {ralign 12:{txt:(}0.042{txt:)}}    {ralign 12:{txt:(}0.038{txt:)}}    {ralign 12:{txt:(}0.048{txt:)}}    {ralign 12:{txt:(}0.046{txt:)}}   {txt}
{txt}{hline 116}
{txt}Observations        {res}          962             962             962             868             962             962   {txt}
{txt}{hline 116}
{txt}Standard errors in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. esttab using "../Results/Tables/Table_4.tex", replace booktabs b(%8.3f) se(%8.3f)  order(active_policy active_policy_initial) ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 label substitute("\_" "_") interaction(" $\times$ ") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "& \multicolumn{c -(}6{c )-}{c -(}c{c )-}{c -(}Coal Debt Origination (log){c )-} \\" ///
>                                                               "\cmidrule{c -(}2-7{c )-}") ///
>                 stats(bank cy N r2_a , fmt( 0 0 %8.0fc 3) labels("Bank FE" "Year FE" "Observations" "Adj-R$^2$" ))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_4.tex"'})

{com}. 
. ********************************************************************************
. ********************************************************************************
. * Table 5: Bank Exit Policies Effects: Isolating the Supply Channel
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/bank_supply_chain_regressions", clear
{txt}
{com}. 
. eststo clear
{txt}
{com}. 
. reghdfe log_1p_borr_fbt ban_intensity_new1, absorb(borrower_id#year BankID) cluster(BankID borrower_id)
{res}{txt}(dropped 533 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 15 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}   103,610
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    344{txt}){col 67}= {res}      2.42
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1211
{txt}{col 51}R-squared{col 67}= {res}    0.3391
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3018
{txt}{col 1}Number of clusters ({res}BankID{txt}) {col 30}= {res}     1,041{txt}{col 51}Within R-sq.{col 67}= {res}    0.0001
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       345{txt}{col 51}Root MSE{col 67}= {res}    3.3248

{txt}{ralign 84:(Std. err. adjusted for {res:345} clusters in {res:BankID borrower_id})}
{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}   log_1p_borr_fbt{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ban_intensity_new1 {c |}{col 20}{res}{space 2}-.3134919{col 32}{space 2} .2017166{col 43}{space 1}   -1.55{col 52}{space 3}0.121{col 60}{space 4}-.7102451{col 73}{space 3} .0832614
{txt}{space 13}_cons {c |}{col 20}{res}{space 2} 1.899258{col 32}{space 2} .0078371{col 43}{space 1}  242.34{col 52}{space 3}0.000{col 60}{space 4} 1.883843{col 73}{space 3} 1.914672
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 20}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}        Absorbed FE{col 21}{c |} Categories{col 34} - Redundant{col 46}  = Num. Coefs{col 61}{c |}
{res}{col 1}{text}{hline 20}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}   borrower_id#year{col 21}{c |}{space 1}     4485{col 34}{space 1}     4485{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}             BankID{col 21}{c |}{space 1}     1041{col 34}{space 1}     1041{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}{hline 20}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}.         
. reghdfe log_1p_borr_fbt i.highshare#c.ban_intensity_new1, absorb(borrower_id#year BankID) cluster(BankID borrower_id)
{res}{txt}(dropped 364 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 15 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}    94,445
{txt}Absorbing 2 HDFE groups{col 51}F({res}   2{txt},{res}    307{txt}){col 67}= {res}      2.36
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0960
{txt}{col 51}R-squared{col 67}= {res}    0.3415
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3045
{txt}{col 1}Number of clusters ({res}BankID{txt}) {col 30}= {res}     1,014{txt}{col 51}Within R-sq.{col 67}= {res}    0.0003
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       308{txt}{col 51}Root MSE{col 67}= {res}    3.3313

{txt}{ralign 96:(Std. err. adjusted for {res:308} clusters in {res:BankID borrower_id})}
{hline 31}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 32}{c |}{col 44}    Robust
{col 1}               log_1p_borr_fbt{col 32}{c |} Coefficient{col 44}  std. err.{col 56}      t{col 64}   P>|t|{col 72}     [95% con{col 85}f. interval]
{hline 31}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
highshare#c.ban_intensity_new1 {c |}
{space 2}$\text{Low Coal Share}_{f}$  {c |}{col 32}{res}{space 2}-.0877626{col 44}{space 2}  .240866{col 55}{space 1}   -0.36{col 64}{space 3}0.716{col 72}{space 4}-.5617198{col 85}{space 3} .3861946
{txt}{space 1}$\text{High Coal Share}_{f}$  {c |}{col 32}{res}{space 2}-.7133364{col 44}{space 2} .3290533{col 55}{space 1}   -2.17{col 64}{space 3}0.031{col 72}{space 4}-1.360822{col 85}{space 3}-.0658512
{txt}{space 30} {c |}
{space 25}_cons {c |}{col 32}{res}{space 2} 1.918977{col 44}{space 2} .0084855{col 55}{space 1}  226.15{col 64}{space 3}0.000{col 72}{space 4}  1.90228{col 85}{space 3} 1.935674
{txt}{hline 31}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 20}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}        Absorbed FE{col 21}{c |} Categories{col 34} - Redundant{col 46}  = Num. Coefs{col 61}{c |}
{res}{col 1}{text}{hline 20}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}   borrower_id#year{col 21}{c |}{space 1}     4004{col 34}{space 1}     4004{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}             BankID{col 21}{c |}{space 1}     1014{col 34}{space 1}     1014{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}{hline 20}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe log_1p_borr_fbt i.median_assets_mean#c.ban_intensity_new1, absorb(borrower_id#year BankID) cluster(BankID borrower_id)
{res}{txt}(dropped 247 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 14 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}    95,732
{txt}Absorbing 2 HDFE groups{col 51}F({res}   2{txt},{res}    275{txt}){col 67}= {res}      2.22
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1103
{txt}{col 51}R-squared{col 67}= {res}    0.3223
{txt}{col 51}Adj R-squared{col 67}= {res}    0.2880
{txt}{col 1}Number of clusters ({res}BankID{txt}) {col 30}= {res}     1,014{txt}{col 51}Within R-sq.{col 67}= {res}    0.0003
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       276{txt}{col 51}Root MSE{col 67}= {res}    3.3638

{txt}{ralign 86:(Std. err. adjusted for {res:276} clusters in {res:BankID borrower_id})}
{hline 21}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 22}{c |}{col 34}    Robust
{col 1}     log_1p_borr_fbt{col 22}{c |} Coefficient{col 34}  std. err.{col 46}      t{col 54}   P>|t|{col 62}     [95% con{col 75}f. interval]
{hline 21}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}median_assets_mean#{c |}
c.ban_intensity_new1 {c |}
{space 9}Small Firm  {c |}{col 22}{res}{space 2}-.5971134{col 34}{space 2}  .283765{col 45}{space 1}   -2.10{col 54}{space 3}0.036{col 62}{space 4}-1.155741{col 75}{space 3}-.0384856
{txt}{space 9}Large Firm  {c |}{col 22}{res}{space 2}-.1850546{col 34}{space 2} .2386211{col 45}{space 1}   -0.78{col 54}{space 3}0.439{col 62}{space 4}-.6548107{col 75}{space 3} .2847015
{txt}{space 20} {c |}
{space 15}_cons {c |}{col 22}{res}{space 2} 1.912368{col 34}{space 2} .0082313{col 45}{space 1}  232.33{col 54}{space 3}0.000{col 62}{space 4} 1.896164{col 75}{space 3} 1.928572
{txt}{hline 21}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 20}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}        Absorbed FE{col 21}{c |} Categories{col 34} - Redundant{col 46}  = Num. Coefs{col 61}{c |}
{res}{col 1}{text}{hline 20}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}   borrower_id#year{col 21}{c |}{space 1}     3588{col 34}{space 1}     3588{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}             BankID{col 21}{c |}{space 1}     1014{col 34}{space 1}     1014{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}{hline 20}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe log_1p_borr_fbt c.ban_intensity_new1 if coal_industry_mining == 0, absorb(borrower_id#year BankID) cluster(BankID borrower_id)
{res}{txt}(dropped 208 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 16 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}    47,723
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    153{txt}){col 67}= {res}      6.19
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0139
{txt}{col 51}R-squared{col 67}= {res}    0.3558
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3166
{txt}{col 1}Number of clusters ({res}BankID{txt}) {col 30}= {res}       732{txt}{col 51}Within R-sq.{col 67}= {res}    0.0005
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       154{txt}{col 51}Root MSE{col 67}= {res}    3.3287

{txt}{ralign 84:(Std. err. adjusted for {res:154} clusters in {res:BankID borrower_id})}
{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}   log_1p_borr_fbt{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ban_intensity_new1 {c |}{col 20}{res}{space 2}-.6318208{col 32}{space 2} .2539755{col 43}{space 1}   -2.49{col 52}{space 3}0.014{col 60}{space 4}-1.133572{col 73}{space 3}-.1300694
{txt}{space 13}_cons {c |}{col 20}{res}{space 2} 1.955978{col 32}{space 2} .0092757{col 43}{space 1}  210.87{col 52}{space 3}0.000{col 60}{space 4} 1.937653{col 73}{space 3} 1.974303
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 20}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}        Absorbed FE{col 21}{c |} Categories{col 34} - Redundant{col 46}  = Num. Coefs{col 61}{c |}
{res}{col 1}{text}{hline 20}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}   borrower_id#year{col 21}{c |}{space 1}     2002{col 34}{space 1}     2002{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}             BankID{col 21}{c |}{space 1}      732{col 34}{space 1}      732{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}{hline 20}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe log_1p_borr_fbt c.ban_intensity_new1 if coal_industry_mining == 1, absorb(borrower_id#year BankID) cluster(BankID borrower_id)
{res}{txt}(dropped 247 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 15 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}    55,120
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    179{txt}){col 67}= {res}      0.05
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.8184
{txt}{col 51}R-squared{col 67}= {res}    0.3329
{txt}{col 51}Adj R-squared{col 67}= {res}    0.2929
{txt}{col 1}Number of clusters ({res}BankID{txt}) {col 30}= {res}       779{txt}{col 51}Within R-sq.{col 67}= {res}    0.0000
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       180{txt}{col 51}Root MSE{col 67}= {res}    3.3198

{txt}{ralign 84:(Std. err. adjusted for {res:180} clusters in {res:BankID borrower_id})}
{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}    Robust
{col 1}   log_1p_borr_fbt{col 20}{c |} Coefficient{col 32}  std. err.{col 44}      t{col 52}   P>|t|{col 60}     [95% con{col 73}f. interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ban_intensity_new1 {c |}{col 20}{res}{space 2}-.0553985{col 32}{space 2} .2409597{col 43}{space 1}   -0.23{col 52}{space 3}0.818{col 60}{space 4}-.5308855{col 73}{space 3} .4200886
{txt}{space 13}_cons {c |}{col 20}{res}{space 2} 1.863926{col 32}{space 2} .0091476{col 43}{space 1}  203.76{col 52}{space 3}0.000{col 60}{space 4} 1.845875{col 73}{space 3} 1.881977
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 20}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}        Absorbed FE{col 21}{c |} Categories{col 34} - Redundant{col 46}  = Num. Coefs{col 61}{c |}
{res}{col 1}{text}{hline 20}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}   borrower_id#year{col 21}{c |}{space 1}     2340{col 34}{space 1}     2340{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}             BankID{col 21}{c |}{space 1}      779{col 34}{space 1}      779{col 46}{result}{space 1}        0{col 60}{text}*{col 61}{c |}
{res}{col 1}{text}{hline 20}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. esttab, label numbers starlevels(* .10 ** .05 *** .01) b(%8.3f) se(%8.3f)  nocons stats(N r2_a)
{res}
{txt}{hline 100}
{txt}                              (1)             (2)             (3)             (4)             (5)   
{txt}                     log_1p_bor~t    log_1p_bor~t    log_1p_bor~t    log_1p_bor~t    log_1p_bor~t   
{txt}{hline 100}
{txt}$\text{Exit Policy~,{res}       -0.313                                          -0.632**        -0.055   {txt}
                    {res} {ralign 12:{txt:(}0.202{txt:)}}                                    {ralign 12:{txt:(}0.254{txt:)}}    {ralign 12:{txt:(}0.241{txt:)}}   {txt}

{txt}$\text{Low Coal Sh~\{res}                       -0.088                                                   {txt}
                    {res}                 {ralign 12:{txt:(}0.241{txt:)}}                                                   {txt}

{txt}$\text{High Coal S~${res}                       -0.713**                                                 {txt}
                    {res}                 {ralign 12:{txt:(}0.329{txt:)}}                                                   {txt}

{txt}Small Firm # $\tex~ {res}                                       -0.597**                                 {txt}
                    {res}                                 {ralign 12:{txt:(}0.284{txt:)}}                                   {txt}

{txt}Large Firm # $\tex~ {res}                                       -0.185                                   {txt}
                    {res}                                 {ralign 12:{txt:(}0.239{txt:)}}                                   {txt}
{txt}{hline 100}
{txt}N                   {res}      1.0e+05         9.4e+04         9.6e+04         4.8e+04         5.5e+04   {txt}
{txt}r2_a                {res}        0.302           0.305           0.288           0.317           0.293   {txt}
{txt}{hline 100}
{txt}Standard errors in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. esttab using "../Results/Tables/Table_5.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 label substitute("\_" "_") interaction(" $\times$ ") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "& \multicolumn{c -(}5{c )-}{c -(}c{c )-}{c -(}Debt Issuance (log){c )-} \\" ///
>                                                               "\cmidrule{c -(}2-6{c )-}" ///
>                                                                                                                           "& & & & Power & Mining \\" ///
>                                                                                                                           "\cmidrule{c -(}5-6{c )-}") ///
>                 stats(bank borrower_year N r2_a , fmt( 0 0 %8.0fc 3) labels("Bank FE" "Borrower x Year FE" "Observations" "Adj-R$^2$" )) ///
>                                 postfoot("\bottomrule \\ \end{c -(}tabular{c )-}{c )-}")
{res}{txt}(output written to {browse  `"../Results/Tables/Table_5.tex"'})

{com}.                                 
. ********************************************************************************
. ********************************************************************************
. * Table 6: Effects of Bank Exit on Coal Firm Debt Issuance
. ********************************************************************************
. ********************************************************************************
. use ../Intermediate/analysis_panel_firmyear, clear
{txt}
{com}. keep if aggborr_pre_debt > 0 & Country != "xChina"
{txt}(1,833 observations deleted)

{com}. 
. eststo clear
{txt}
{com}. 
. reghdfe log_debt ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year) cl(borrower_id)
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 2 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,666
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    281{txt}){col 67}= {res}      0.46
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.4970
{txt}{col 51}R-squared{col 67}= {res}    0.3854
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3315
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0001
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       282{txt}{col 51}Root MSE{col 67}= {res}    4.9551

{txt}{ralign 97:(Std. err. adjusted for {res:282} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_debt{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.0838925{col 45}{space 2} .1233553{col 56}{space 1}   -0.68{col 65}{space 3}0.497{col 73}{space 4}-.3267103{col 86}{space 3} .1589253
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 5.631602{col 45}{space 2} .0529799{col 56}{space 1}  106.30{col 65}{space 3}0.000{col 73}{space 4} 5.527314{col 86}{space 3}  5.73589
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text} borrower_id{col 14}{c |}{space 1}      282{col 27}{space 1}      282{col 39}{result}{space 1}        0{col 53}{text}*{col 54}{c |}
{res}{col 1}{text}        year{col 14}{c |}{space 1}       13{col 27}{space 1}        0{col 39}{result}{space 1}       13{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE4

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:No}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe log_debt ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      2.28
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1320
{txt}{col 51}R-squared{col 67}= {res}    0.4619
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3245
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0007
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    4.9944

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_debt{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.2403418{col 45}{space 2} .1590805{col 56}{space 1}   -1.51{col 65}{space 3}0.132{col 73}{space 4} -.553592{col 86}{space 3} .0729085
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 5.773003{col 45}{space 2} .0642926{col 56}{space 1}   89.79{col 65}{space 3}0.000{col 73}{space 4} 5.646403{col 86}{space 3} 5.899603
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       13{col 38}{space 1}        0{col 50}{result}{space 1}       13{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}       13{col 50}{result}{space 1}      351{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe log_debt c.ss_pre_all_debt_banintsty_n1_sd#i.highshare, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,107
{txt}Absorbing 4 HDFE groups{col 51}F({res}   2{txt},{res}    238{txt}){col 67}= {res}      0.65
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.5207
{txt}{col 51}R-squared{col 67}= {res}    0.4660
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3230
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0005
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       239{txt}{col 51}Root MSE{col 67}= {res}    4.9921

{txt}{ralign 99:(Std. err. adjusted for {res:239} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                         log_debt{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 24}highshare#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 18}Low Coal Share  {c |}{col 35}{res}{space 2}-.1548269{col 47}{space 2} .1733299{col 58}{space 1}   -0.89{col 67}{space 3}0.373{col 75}{space 4}-.4962837{col 88}{space 3} .1866299
{txt}{space 17}High Coal Share  {c |}{col 35}{res}{space 2}-.2262437{col 47}{space 2} .2384753{col 58}{space 1}   -0.95{col 67}{space 3}0.344{col 75}{space 4}-.6960356{col 88}{space 3} .2435482
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2} 5.796424{col 47}{space 2} .0679885{col 58}{space 1}   85.26{col 67}{space 3}0.000{col 75}{space 4} 5.662488{col 88}{space 3}  5.93036
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      239{col 38}{space 1}      239{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       13{col 38}{space 1}        0{col 50}{result}{space 1}       13{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      351{col 38}{space 1}       13{col 50}{result}{space 1}      338{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe log_debt c.ss_pre_all_debt_banintsty_n1_sd#i.median_assets_mean, ///
>     absorb(borrower_id i.count#i.year i.year) cl(borrower_id)
{res}{txt}(dropped 221 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 2 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,886
{txt}Absorbing 3 HDFE groups{col 51}F({res}   2{txt},{res}    221{txt}){col 67}= {res}      0.57
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.5674
{txt}{col 51}R-squared{col 67}= {res}    0.4522
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3200
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0006
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       222{txt}{col 51}Root MSE{col 67}= {res}    5.0516

{txt}{ralign 99:(Std. err. adjusted for {res:222} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                         log_debt{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 15}median_assets_mean#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 22}Small Firm  {c |}{col 35}{res}{space 2}-.2669187{col 47}{space 2} .2587277{col 58}{space 1}   -1.03{col 67}{space 3}0.303{col 75}{space 4}-.7768079{col 88}{space 3} .2429705
{txt}{space 22}Large Firm  {c |}{col 35}{res}{space 2}-.1650106{col 47}{space 2} .2268814{col 58}{space 1}   -0.73{col 67}{space 3}0.468{col 75}{space 4}-.6121385{col 88}{space 3} .2821173
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2} 6.269554{col 47}{space 2} .0840605{col 58}{space 1}   74.58{col 67}{space 3}0.000{col 75}{space 4} 6.103892{col 88}{space 3} 6.435217
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}  borrower_id{col 15}{c |}{space 1}      222{col 28}{space 1}      222{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}      338{col 28}{space 1}        0{col 40}{result}{space 1}      338{col 54}{text} {col 55}{c |}
{res}{col 1}{text}         year{col 15}{c |}{space 1}       13{col 28}{space 1}       13{col 40}{result}{space 1}        0{col 54}{text} {col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3nosy

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe log_debt ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==0, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 247 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,495
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    114{txt}){col 67}= {res}      0.28
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.5997
{txt}{col 51}R-squared{col 67}= {res}    0.4759
{txt}{col 51}Adj R-squared{col 67}= {res}    0.2836
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0002
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       115{txt}{col 51}Root MSE{col 67}= {res}    5.1959

{txt}{ralign 97:(Std. err. adjusted for {res:115} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_debt{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.1333928{col 45}{space 2} .2534668{col 56}{space 1}   -0.53{col 65}{space 3}0.600{col 73}{space 4}-.6355086{col 86}{space 3} .3687231
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 5.973656{col 45}{space 2} .1045005{col 56}{space 1}   57.16{col 65}{space 3}0.000{col 73}{space 4} 5.766641{col 86}{space 3} 6.180671
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      115{col 38}{space 1}      115{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       13{col 38}{space 1}        0{col 50}{result}{space 1}       13{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      221{col 38}{space 1}       13{col 50}{result}{space 1}      208{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. reghdfe log_debt ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==1, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 208 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,703
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    130{txt}){col 67}= {res}      1.23
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.2701
{txt}{col 51}R-squared{col 67}= {res}    0.5296
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3641
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0013
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       131{txt}{col 51}Root MSE{col 67}= {res}    4.8209

{txt}{ralign 97:(Std. err. adjusted for {res:131} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_debt{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.2850051{col 45}{space 2} .2573374{col 56}{space 1}   -1.11{col 65}{space 3}0.270{col 73}{space 4}-.7941163{col 86}{space 3} .2241062
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 5.618364{col 45}{space 2} .0981087{col 56}{space 1}   57.27{col 65}{space 3}0.000{col 73}{space 4} 5.424267{col 86}{space 3}  5.81246
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      131{col 38}{space 1}      131{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       13{col 38}{space 1}        0{col 50}{result}{space 1}       13{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      247{col 38}{space 1}       13{col 50}{result}{space 1}      234{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est6{txt} stored)

{com}. 
. 
. esttab, label nonumbers nocons starlevels(* .10 ** .05 *** .01) 
{res}
{txt}{hline 116}
{txt}                         log_debt        log_debt        log_debt        log_debt        log_debt        log_debt   
{txt}{hline 116}
{txt}$\text{Bank Exit E~}{res}      -0.0839          -0.240                                          -0.133          -0.285   {txt}
                    {res} {ralign 12:{txt:(}-0.68{txt:)}}    {ralign 12:{txt:(}-1.51{txt:)}}                                    {ralign 12:{txt:(}-0.53{txt:)}}    {ralign 12:{txt:(}-1.11{txt:)}}   {txt}

{txt}Low Coal Share # $~i{res}                                       -0.155                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}-0.89{txt:)}}                                                   {txt}

{txt}High Coal Share # ~x{res}                                       -0.226                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}-0.95{txt:)}}                                                   {txt}

{txt}Small Firm # $\tex~x{res}                                                       -0.267                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}-1.03{txt:)}}                                   {txt}

{txt}Large Firm # $\tex~x{res}                                                       -0.165                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}-0.73{txt:)}}                                   {txt}
{txt}{hline 116}
{txt}Observations        {res}         3666            3393            3107            2886            1495            1703   {txt}
{txt}{hline 116}
{txt}t statistics in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. esttab using "../Results/Tables/Table_6.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 label substitute("\_" "_") interaction(" $\times$ ") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "& \multicolumn{c -(}6{c )-}{c -(}c{c )-}{c -(}Debt Issuance (log){c )-} \\" ///
>                                                               "\cmidrule{c -(}2-7{c )-}" ///
>                                                               "& & & & & Power & Mining \\"  /// 
>                                                               "\cmidrule(r{c -(}2pt{c )-}){c -(}6-7{c )-} ") ///
>                 stats(borrower y cy sy N r2_a , fmt(0 0 0 0 %8.0fc 3) labels("Borrower FE" "Year FE" "Country x Year FE" "Size x Year FE" "Observations" "Adj-R$^2$" ))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_6.tex"'})

{com}. ********************************************************************************
. ********************************************************************************
. * Table 7: Adjustment Margin and Substitutions Channels
. ********************************************************************************
. ********************************************************************************
. use ../Intermediate/analysis_panel_firmyear, clear
{txt}
{com}. keep if aggborr_pre_debt>0 & Country!="xChina"
{txt}(1,833 observations deleted)

{com}. 
. eststo clear
{txt}
{com}. 
. reghdfe log_debt_has_coded_policy c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}     11.60
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0008
{txt}{col 51}R-squared{col 67}= {res}    0.5155
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3918
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0037
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    4.4315

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}      log_debt_has_coded_policy{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.4758439{col 45}{space 2} .1396992{col 56}{space 1}   -3.41{col 65}{space 3}0.001{col 73}{space 4}-.7509299{col 86}{space 3}-.2007579
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 4.467103{col 45}{space 2} .0564596{col 56}{space 1}   79.12{col 65}{space 3}0.000{col 73}{space 4} 4.355926{col 86}{space 3} 4.578279
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe log_debt_nopol c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      0.43
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.5128
{txt}{col 51}R-squared{col 67}= {res}    0.4461
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3047
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0001
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    4.7182

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                 log_debt_nopol{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .0970517{col 45}{space 2} .1481012{col 56}{space 1}    0.66{col 65}{space 3}0.513{col 73}{space 4}-.1945789{col 86}{space 3} .3886822
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 4.725186{col 45}{space 2} .0598553{col 56}{space 1}   78.94{col 65}{space 3}0.000{col 73}{space 4} 4.607323{col 86}{space 3} 4.843049
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe log_debt_rel_all_pre c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      0.51
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.4773
{txt}{col 51}R-squared{col 67}= {res}    0.5161
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3926
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0001
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    4.6005

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}           log_debt_rel_all_pre{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} -.087048{col 45}{space 2} .1223204{col 56}{space 1}   -0.71{col 65}{space 3}0.477{col 73}{space 4}-.3279127{col 86}{space 3} .1538167
{txt}{space 26}_cons {c |}{col 33}{res}{space 2}  4.85179{col 45}{space 2} .0494359{col 56}{space 1}   98.14{col 65}{space 3}0.000{col 73}{space 4} 4.754444{col 86}{space 3} 4.949136
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe log_debt_norel_all_pre c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      0.01
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.9252
{txt}{col 51}R-squared{col 67}= {res}    0.4794
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3464
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0000
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    3.8352

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}         log_debt_norel_all_pre{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .0141321{col 45}{space 2} .1504515{col 56}{space 1}    0.09{col 65}{space 3}0.925{col 73}{space 4}-.2821264{col 86}{space 3} .3103906
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 2.505061{col 45}{space 2} .0608051{col 56}{space 1}   41.20{col 65}{space 3}0.000{col 73}{space 4} 2.385328{col 86}{space 3} 2.624794
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe log_debt_non_bank c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      2.25
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1344
{txt}{col 51}R-squared{col 67}= {res}    0.3956
{txt}{col 51}Adj R-squared{col 67}= {res}    0.2413
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0006
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    4.0194

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}              log_debt_non_bank{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.1726997{col 45}{space 2} .1150119{col 56}{space 1}   -1.50{col 65}{space 3}0.134{col 73}{space 4} -.399173{col 86}{space 3} .0537737
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 2.893427{col 45}{space 2} .0464822{col 56}{space 1}   62.25{col 65}{space 3}0.000{col 73}{space 4} 2.801897{col 86}{space 3} 2.984956
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. reghdfe log_debt_banks c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      2.65
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1050
{txt}{col 51}R-squared{col 67}= {res}    0.4644
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3277
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0009
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    4.9722

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                 log_debt_banks{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.2689894{col 45}{space 2} .1653661{col 56}{space 1}   -1.63{col 65}{space 3}0.105{col 73}{space 4}-.5946167{col 86}{space 3}  .056638
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 5.465193{col 45}{space 2} .0668329{col 56}{space 1}   81.77{col 65}{space 3}0.000{col 73}{space 4}  5.33359{col 86}{space 3} 5.596796
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est6{txt} stored)

{com}. 
. reghdfe pos_debt c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      1.83
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1777
{txt}{col 51}R-squared{col 67}= {res}    0.4318
{txt}{col 51}Adj R-squared{col 67}= {res}    0.2866
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0005
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    0.4220

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       pos_debt{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.0171145{col 45}{space 2} .0126637{col 56}{space 1}   -1.35{col 65}{space 3}0.178{col 73}{space 4}-.0420508{col 86}{space 3} .0078219
{txt}{space 26}_cons {c |}{col 33}{res}{space 2}  .485844{col 45}{space 2}  .005118{col 56}{space 1}   94.93{col 65}{space 3}0.000{col 73}{space 4}  .475766{col 86}{space 3} .4959221
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est7{txt} stored)

{com}. 
. reghdfe logim_debt c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 245 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 13 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,488
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    220{txt}){col 67}= {res}      4.13
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0434
{txt}{col 51}R-squared{col 67}= {res}    0.5506
{txt}{col 51}Adj R-squared{col 67}= {res}    0.3263
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0043
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       221{txt}{col 51}Root MSE{col 67}= {res}    1.5960

{txt}{ralign 97:(Std. err. adjusted for {res:221} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                     logim_debt{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.2931502{col 45}{space 2} .1443141{col 56}{space 1}   -2.03{col 65}{space 3}0.043{col 73}{space 4}-.5775652{col 86}{space 3}-.0087351
{txt}{space 26}_cons {c |}{col 33}{res}{space 2}  12.0297{col 45}{space 2}  .052701{col 56}{space 1}  228.26{col 65}{space 3}0.000{col 73}{space 4} 11.92583{col 86}{space 3} 12.13356
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      221{col 38}{space 1}      221{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      209{col 38}{space 1}        0{col 50}{result}{space 1}      209{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est8{txt} stored)

{com}. 
. reghdfe log_equity_public c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 260 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,393
{txt}Absorbing 3 HDFE groups{col 51}F({res}   1{txt},{res}    260{txt}){col 67}= {res}      0.04
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.8480
{txt}{col 51}R-squared{col 67}= {res}    0.4184
{txt}{col 51}Adj R-squared{col 67}= {res}    0.2698
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0000
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       261{txt}{col 51}Root MSE{col 67}= {res}    3.7282

{txt}{ralign 97:(Std. err. adjusted for {res:261} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}              log_equity_public{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .0195379{col 45}{space 2} .1018067{col 56}{space 1}    0.19{col 65}{space 3}0.848{col 73}{space 4}-.1809327{col 86}{space 3} .2200086
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 1.696521{col 45}{space 2} .0411453{col 56}{space 1}   41.23{col 65}{space 3}0.000{col 73}{space 4} 1.615501{col 86}{space 3} 1.777542
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      261{col 38}{space 1}      261{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      364{col 38}{space 1}        0{col 50}{result}{space 1}      364{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       78{col 38}{space 1}       13{col 50}{result}{space 1}       65{col 64}{text} {col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE2

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est9{txt} stored)

{com}. 
. esttab, label nocons nonotes starlevels(* .10 ** .05 *** .01) ///
>     nolegend nonumber interaction(" $\times$ ") ///
>     mgroups(A B C D, pattern(1 0 1 0 1 0 1 ))
{res}
{txt}{hline 164}
{txt}                                A                               B                               C                               D                                   
{txt}                     log_debt_h~y    log_deb~opol    log_debt_r~e    log_debt_n..    log_debt_n~k    log_debt_b~s        pos_debt      logim_debt    log_equity~c   
{txt}{hline 164}
{txt}$\text{Bank Exit E~}{res}       -0.476***       0.0971         -0.0870          0.0141          -0.173          -0.269         -0.0171          -0.293**        0.0195   {txt}
                    {res} {ralign 12:{txt:(}-3.41{txt:)}}    {ralign 12:{txt:(}0.66{txt:)}}    {ralign 12:{txt:(}-0.71{txt:)}}    {ralign 12:{txt:(}0.09{txt:)}}    {ralign 12:{txt:(}-1.50{txt:)}}    {ralign 12:{txt:(}-1.63{txt:)}}    {ralign 12:{txt:(}-1.35{txt:)}}    {ralign 12:{txt:(}-2.03{txt:)}}    {ralign 12:{txt:(}0.19{txt:)}}   {txt}
{txt}{hline 164}
{txt}Observations        {res}         3393            3393            3393            3393            3393            3393            3393            1488            3393   {txt}
{txt}{hline 164}

{com}. 
. esttab using "../Results/Tables/Table_7.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend nonumbers ///
>                 label substitute("\_" "_") interaction(" $\times$ ") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabularx{c )-}{c -(}1.35\textwidth{c )-}{c -(}Xl*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "& \multicolumn{c -(}8{c )-}{c -(}c{c )-}{c -(}Debt Issuance (log){c )-} & Equity \\" ///
>                                                               "\cmidrule{c -(}2-10{c )-}" ///
>                                                               "& \multicolumn{c -(}2{c )-}{c -(}c{c )-}{c -(}Coal Policy Bank{c )-} & \multicolumn{c -(}2{c )-}{c -(}c{c )-}{c -(}Relationship Bank{c )-}  & \multicolumn{c -(}2{c )-}{c -(}c{c )-}{c -(}Non-Bank{c )-} &                                 \multicolumn{c -(}2{c )-}{c -(}c{c )-}{c -(}Margin{c )-} \\" ///
>                                                               "\cmidrule(r{c -(}2pt{c )-}){c -(}2-3{c )-}  \cmidrule(l{c -(}2pt{c )-}){c -(}4-5{c )-} \cmidrule(l{c -(}2pt{c )-}){c -(}6-7{c )-} \cmidrule(l{c -(}2pt{c )-}){c -(}8-9{c )-} " ///
>                                                               "& Yes & No & Yes & No & Yes & No & Extensive & Intensive & \\")  ///
>                                 postfoot("\bottomrule \end{c -(}tabularx{c )-}{c )-}") ///
>                 stats(borrower cy sy N r2_a , fmt( 0 0 0 %8.0fc 3) labels("Borrower FE" "Country x Year FE" "Size x Year FE" "Observations" "Adj-R$^2$" ))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_7.tex"'})

{com}. 
. ********************************************************************************
. ********************************************************************************
. * Table 8: Balance Sheet Effects
. ********************************************************************************
. ********************************************************************************
. use ../Intermediate/analysis_panel_firmyear, clear
{txt}
{com}. keep if Country!="xChina"
{txt}(0 observations deleted)

{com}. 
. ***Panel A: Long Term Debt 
. eststo clear
{txt}
{com}. 
. reghdfe log_ltd ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year) cl(borrower_id)
{res}{txt}(dropped 4 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,622
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    318{txt}){col 67}= {res}      4.76
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0299
{txt}{col 51}R-squared{col 67}= {res}    0.1658
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0460
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0031
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       319{txt}{col 51}Root MSE{col 67}= {res}    1.0094

{txt}{ralign 97:(Std. err. adjusted for {res:319} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_ltd{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}  .097105{col 45}{space 2} .0445146{col 56}{space 1}    2.18{col 65}{space 3}0.030{col 73}{space 4} .0095246{col 86}{space 3} .1846855
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 10.32309{col 45}{space 2} .0157861{col 56}{space 1}  653.93{col 65}{space 3}0.000{col 73}{space 4} 10.29203{col 86}{space 3} 10.35415
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text} borrower_id{col 14}{c |}{space 1}      319{col 27}{space 1}      319{col 39}{result}{space 1}        0{col 53}{text}*{col 54}{c |}
{res}{col 1}{text}        year{col 14}{c |}{space 1}       10{col 27}{space 1}        0{col 39}{result}{space 1}       10{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE4

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:No}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe log_ltd ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 181 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,445
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    297{txt}){col 67}= {res}      4.67
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0315
{txt}{col 51}R-squared{col 67}= {res}    0.2850
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0482
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0052
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       298{txt}{col 51}Root MSE{col 67}= {res}    1.0179

{txt}{ralign 97:(Std. err. adjusted for {res:298} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_ltd{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .1663431{col 45}{space 2} .0769713{col 56}{space 1}    2.16{col 65}{space 3}0.031{col 73}{space 4} .0148648{col 86}{space 3} .3178213
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 10.29656{col 45}{space 2} .0257725{col 56}{space 1}  399.52{col 65}{space 3}0.000{col 73}{space 4} 10.24584{col 86}{space 3} 10.34728
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      298{col 38}{space 1}      298{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      260{col 38}{space 1}       10{col 50}{result}{space 1}      250{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       60{col 38}{space 1}       10{col 50}{result}{space 1}       50{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe log_ltd i.highshare#c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 162 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 10 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,219
{txt}Absorbing 4 HDFE groups{col 51}F({res}   2{txt},{res}    269{txt}){col 67}= {res}      1.89
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1527
{txt}{col 51}R-squared{col 67}= {res}    0.3070
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0616
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0071
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       270{txt}{col 51}Root MSE{col 67}= {res}    1.0103

{txt}{ralign 99:(Std. err. adjusted for {res:270} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                          log_ltd{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 24}highshare#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 18}Low Coal Share  {c |}{col 35}{res}{space 2} .2255716{col 47}{space 2} .1227845{col 58}{space 1}    1.84{col 67}{space 3}0.067{col 75}{space 4}-.0161693{col 88}{space 3} .4673125
{txt}{space 17}High Coal Share  {c |}{col 35}{res}{space 2} .1022937{col 47}{space 2} .0659425{col 58}{space 1}    1.55{col 67}{space 3}0.122{col 75}{space 4}-.0275354{col 88}{space 3} .2321228
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2} 10.28906{col 47}{space 2} .0316481{col 58}{space 1}  325.11{col 67}{space 3}0.000{col 75}{space 4} 10.22675{col 88}{space 3} 10.35137
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      270{col 38}{space 1}      270{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      259{col 38}{space 1}       10{col 50}{result}{space 1}      249{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       60{col 38}{space 1}       10{col 50}{result}{space 1}       50{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe log_ltd c.ss_pre_all_debt_banintsty_n1_sd#i.median_assets_mean, ///
>     absorb(borrower_id i.count#i.year i.year) cl(borrower_id)
{res}{txt}(dropped 181 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 9 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,445
{txt}Absorbing 3 HDFE groups{col 51}F({res}   2{txt},{res}    297{txt}){col 67}= {res}      4.31
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0143
{txt}{col 51}R-squared{col 67}= {res}    0.2729
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0572
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0084
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       298{txt}{col 51}Root MSE{col 67}= {res}    1.0131

{txt}{ralign 99:(Std. err. adjusted for {res:298} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                          log_ltd{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 15}median_assets_mean#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 22}Small Firm  {c |}{col 35}{res}{space 2} .0516166{col 47}{space 2} .0802066{col 58}{space 1}    0.64{col 67}{space 3}0.520{col 75}{space 4}-.1062287{col 88}{space 3}  .209462
{txt}{space 22}Large Firm  {c |}{col 35}{res}{space 2} .2248174{col 47}{space 2} .0777814{col 58}{space 1}    2.89{col 67}{space 3}0.004{col 75}{space 4} .0717449{col 88}{space 3} .3778899
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2} 10.30777{col 47}{space 2} .0220853{col 58}{space 1}  466.73{col 67}{space 3}0.000{col 75}{space 4} 10.26431{col 88}{space 3} 10.35124
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}  borrower_id{col 15}{c |}{space 1}      298{col 28}{space 1}      298{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}      260{col 28}{space 1}        0{col 40}{result}{space 1}      260{col 54}{text} {col 55}{c |}
{res}{col 1}{text}         year{col 15}{c |}{space 1}       10{col 28}{space 1}       10{col 40}{result}{space 1}        0{col 54}{text} {col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3nosy

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe log_ltd ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==0, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 146 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,072
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    130{txt}){col 67}= {res}      2.59
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1098
{txt}{col 51}R-squared{col 67}= {res}    0.3499
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0370
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0087
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       131{txt}{col 51}Root MSE{col 67}= {res}    0.9495

{txt}{ralign 97:(Std. err. adjusted for {res:131} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_ltd{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .2426826{col 45}{space 2} .1507373{col 56}{space 1}    1.61{col 65}{space 3}0.110{col 73}{space 4} -.055533{col 86}{space 3} .5408983
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 10.28411{col 45}{space 2} .0577382{col 56}{space 1}  178.12{col 65}{space 3}0.000{col 73}{space 4} 10.16988{col 86}{space 3} 10.39834
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      131{col 38}{space 1}      131{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      168{col 38}{space 1}       10{col 50}{result}{space 1}      158{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       59{col 38}{space 1}       10{col 50}{result}{space 1}       49{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. reghdfe log_ltd ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==1, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 150 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,258
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    153{txt}){col 67}= {res}      1.23
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.2696
{txt}{col 51}R-squared{col 67}= {res}    0.3630
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0743
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0020
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       154{txt}{col 51}Root MSE{col 67}= {res}    1.0632

{txt}{ralign 97:(Std. err. adjusted for {res:154} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_ltd{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .0964777{col 45}{space 2} .0870764{col 56}{space 1}    1.11{col 65}{space 3}0.270{col 73}{space 4}-.0755496{col 86}{space 3}  .268505
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 10.31307{col 45}{space 2} .0253805{col 56}{space 1}  406.34{col 65}{space 3}0.000{col 73}{space 4} 10.26293{col 86}{space 3} 10.36321
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      154{col 38}{space 1}      154{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      190{col 38}{space 1}       10{col 50}{result}{space 1}      180{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       58{col 38}{space 1}       10{col 50}{result}{space 1}       48{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est6{txt} stored)

{com}. 
. esttab, label starlevels(* .10 ** .05 *** .01) nocons
{res}
{txt}{hline 116}
{txt}                              (1)             (2)             (3)             (4)             (5)             (6)   
{txt}                          log_ltd         log_ltd         log_ltd         log_ltd         log_ltd         log_ltd   
{txt}{hline 116}
{txt}$\text{Bank Exit E~}{res}       0.0971**         0.166**                                         0.243          0.0965   {txt}
                    {res} {ralign 12:{txt:(}2.18{txt:)}}    {ralign 12:{txt:(}2.16{txt:)}}                                    {ralign 12:{txt:(}1.61{txt:)}}    {ralign 12:{txt:(}1.11{txt:)}}   {txt}

{txt}Low Coal Share # $~i{res}                                        0.226*                                                  {txt}
                    {res}                                 {ralign 12:{txt:(}1.84{txt:)}}                                                   {txt}

{txt}High Coal Share # ~x{res}                                        0.102                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}1.55{txt:)}}                                                   {txt}

{txt}Small Firm # $\tex~x{res}                                                       0.0516                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.64{txt:)}}                                   {txt}

{txt}Large Firm # $\tex~x{res}                                                        0.225***                                {txt}
                    {res}                                                 {ralign 12:{txt:(}2.89{txt:)}}                                   {txt}
{txt}{hline 116}
{txt}Observations        {res}         2622            2445            2219            2445            1072            1258   {txt}
{txt}{hline 116}
{txt}t statistics in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. esttab using "../Results/Tables/Table_8_Panel_A.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 label interaction(" $\times$ ") ///
>                                 substitute("\_" "_") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "&  \multicolumn{c -(}6{c )-}{c -(}c{c )-}{c -(}\textbf{c -(}Long-Term Debt (log){c )-}{c )-}  \\" ///
>                                                                                                                           "\cmidrule{c -(}2-7{c )-} & & & & & Power & Mining \\" ///
>                                                               "\cmidrule(l{c -(}2pt{c )-}){c -(}6-7{c )-}") ///
>                 stats(borrower y cy sy N r2_a , fmt(0 0 0 0 %8.0fc 3) labels("Borrower FE" "Year FE" "Country x Year FE" "Size x Year FE" "Observations" "Adj-R$^2$" ))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_8_Panel_A.tex"'})

{com}.               
. 
. ***Panel B: Leverage  
. eststo clear
{txt}
{com}. 
. reghdfe log_lev ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year) cl(borrower_id)
{res}{txt}(dropped 4 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,622
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    318{txt}){col 67}= {res}      2.06
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1521
{txt}{col 51}R-squared{col 67}= {res}    0.1498
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0277
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0013
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       319{txt}{col 51}Root MSE{col 67}= {res}    1.3870

{txt}{ralign 97:(Std. err. adjusted for {res:319} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_lev{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}    .0852{col 45}{space 2} .0593497{col 56}{space 1}    1.44{col 65}{space 3}0.152{col 73}{space 4}-.0315677{col 86}{space 3} .2019677
{txt}{space 26}_cons {c |}{col 33}{res}{space 2}-2.717881{col 45}{space 2} .0210471{col 56}{space 1} -129.13{col 65}{space 3}0.000{col 73}{space 4} -2.75929{col 86}{space 3}-2.676472
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text} borrower_id{col 14}{c |}{space 1}      319{col 27}{space 1}      319{col 39}{result}{space 1}        0{col 53}{text}*{col 54}{c |}
{res}{col 1}{text}        year{col 14}{c |}{space 1}       10{col 27}{space 1}        0{col 39}{result}{space 1}       10{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE4

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:No}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe log_lev ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 181 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,445
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    297{txt}){col 67}= {res}      5.00
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0261
{txt}{col 51}R-squared{col 67}= {res}    0.2604
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0155
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0029
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       298{txt}{col 51}Root MSE{col 67}= {res}    1.3997

{txt}{ralign 97:(Std. err. adjusted for {res:298} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_lev{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .1708997{col 45}{space 2} .0764507{col 56}{space 1}    2.24{col 65}{space 3}0.026{col 73}{space 4}  .020446{col 86}{space 3} .3213533
{txt}{space 26}_cons {c |}{col 33}{res}{space 2}-2.750915{col 45}{space 2} .0255981{col 56}{space 1} -107.47{col 65}{space 3}0.000{col 73}{space 4}-2.801292{col 86}{space 3}-2.700538
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      298{col 38}{space 1}      298{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      260{col 38}{space 1}       10{col 50}{result}{space 1}      250{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       60{col 38}{space 1}       10{col 50}{result}{space 1}       50{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe log_lev i.highshare#c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 162 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 10 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,219
{txt}Absorbing 4 HDFE groups{col 51}F({res}   2{txt},{res}    269{txt}){col 67}= {res}      2.54
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0810
{txt}{col 51}R-squared{col 67}= {res}    0.2897
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0382
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0041
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       270{txt}{col 51}Root MSE{col 67}= {res}    1.3835

{txt}{ralign 99:(Std. err. adjusted for {res:270} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                          log_lev{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 24}highshare#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 18}Low Coal Share  {c |}{col 35}{res}{space 2} .2337666{col 47}{space 2} .1041142{col 58}{space 1}    2.25{col 67}{space 3}0.026{col 75}{space 4} .0287843{col 88}{space 3} .4387488
{txt}{space 17}High Coal Share  {c |}{col 35}{res}{space 2} .0803566{col 47}{space 2} .0823524{col 58}{space 1}    0.98{col 67}{space 3}0.330{col 75}{space 4}-.0817807{col 88}{space 3} .2424938
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2}-2.749785{col 47}{space 2} .0280069{col 58}{space 1}  -98.18{col 67}{space 3}0.000{col 75}{space 4}-2.804926{col 88}{space 3}-2.694645
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      270{col 38}{space 1}      270{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      259{col 38}{space 1}       10{col 50}{result}{space 1}      249{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       60{col 38}{space 1}       10{col 50}{result}{space 1}       50{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe log_lev c.ss_pre_all_debt_banintsty_n1_sd#i.median_assets_mean, ///
>     absorb(borrower_id i.count#i.year i.year) cl(borrower_id)
{res}{txt}(dropped 181 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 9 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,445
{txt}Absorbing 3 HDFE groups{col 51}F({res}   2{txt},{res}    297{txt}){col 67}= {res}      3.12
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0455
{txt}{col 51}R-squared{col 67}= {res}    0.2470
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0237
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0039
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       298{txt}{col 51}Root MSE{col 67}= {res}    1.3939

{txt}{ralign 99:(Std. err. adjusted for {res:298} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                          log_lev{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 15}median_assets_mean#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 22}Small Firm  {c |}{col 35}{res}{space 2} .0998067{col 47}{space 2} .0835696{col 58}{space 1}    1.19{col 67}{space 3}0.233{col 75}{space 4}-.0646569{col 88}{space 3} .2642703
{txt}{space 22}Large Firm  {c |}{col 35}{res}{space 2} .2083317{col 47}{space 2}  .084782{col 58}{space 1}    2.46{col 67}{space 3}0.015{col 75}{space 4} .0414822{col 88}{space 3} .3751813
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2}-2.744152{col 47}{space 2} .0228175{col 58}{space 1} -120.27{col 67}{space 3}0.000{col 75}{space 4}-2.789056{col 88}{space 3}-2.699247
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}  borrower_id{col 15}{c |}{space 1}      298{col 28}{space 1}      298{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}      260{col 28}{space 1}        0{col 40}{result}{space 1}      260{col 54}{text} {col 55}{c |}
{res}{col 1}{text}         year{col 15}{c |}{space 1}       10{col 28}{space 1}       10{col 40}{result}{space 1}        0{col 54}{text} {col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3nosy

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe log_lev ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==0, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 146 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,072
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    130{txt}){col 67}= {res}      1.75
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1876
{txt}{col 51}R-squared{col 67}= {res}    0.3036
{txt}{col 51}Adj R-squared{col 67}= {res}   -0.0316
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0032
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       131{txt}{col 51}Root MSE{col 67}= {res}    1.4198

{txt}{ralign 97:(Std. err. adjusted for {res:131} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_lev{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .2179148{col 45}{space 2} .1645013{col 56}{space 1}    1.32{col 65}{space 3}0.188{col 73}{space 4}-.1075313{col 86}{space 3} .5433609
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} -2.77266{col 45}{space 2} .0630104{col 56}{space 1}  -44.00{col 65}{space 3}0.000{col 73}{space 4}-2.897319{col 86}{space 3}-2.648002
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      131{col 38}{space 1}      131{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      168{col 38}{space 1}       10{col 50}{result}{space 1}      158{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       59{col 38}{space 1}       10{col 50}{result}{space 1}       49{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. reghdfe log_lev ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==1, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 150 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,258
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    153{txt}){col 67}= {res}      3.78
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0535
{txt}{col 51}R-squared{col 67}= {res}    0.3437
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0463
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0035
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       154{txt}{col 51}Root MSE{col 67}= {res}    1.3901

{txt}{ralign 97:(Std. err. adjusted for {res:154} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                        log_lev{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .1663376{col 45}{space 2} .0854992{col 56}{space 1}    1.95{col 65}{space 3}0.054{col 73}{space 4}-.0025738{col 86}{space 3} .3352489
{txt}{space 26}_cons {c |}{col 33}{res}{space 2}-2.746587{col 45}{space 2} .0249207{col 56}{space 1} -110.21{col 65}{space 3}0.000{col 73}{space 4} -2.79582{col 86}{space 3}-2.697354
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      154{col 38}{space 1}      154{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      190{col 38}{space 1}       10{col 50}{result}{space 1}      180{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       58{col 38}{space 1}       10{col 50}{result}{space 1}       48{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est6{txt} stored)

{com}. 
. esttab, label starlevels(* .10 ** .05 *** .01) nocons
{res}
{txt}{hline 116}
{txt}                              (1)             (2)             (3)             (4)             (5)             (6)   
{txt}                          log_lev         log_lev         log_lev         log_lev         log_lev         log_lev   
{txt}{hline 116}
{txt}$\text{Bank Exit E~}{res}       0.0852           0.171**                                         0.218           0.166*  {txt}
                    {res} {ralign 12:{txt:(}1.44{txt:)}}    {ralign 12:{txt:(}2.24{txt:)}}                                    {ralign 12:{txt:(}1.32{txt:)}}    {ralign 12:{txt:(}1.95{txt:)}}   {txt}

{txt}Low Coal Share # $~i{res}                                        0.234**                                                 {txt}
                    {res}                                 {ralign 12:{txt:(}2.25{txt:)}}                                                   {txt}

{txt}High Coal Share # ~x{res}                                       0.0804                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}0.98{txt:)}}                                                   {txt}

{txt}Small Firm # $\tex~x{res}                                                       0.0998                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}1.19{txt:)}}                                   {txt}

{txt}Large Firm # $\tex~x{res}                                                        0.208**                                 {txt}
                    {res}                                                 {ralign 12:{txt:(}2.46{txt:)}}                                   {txt}
{txt}{hline 116}
{txt}Observations        {res}         2622            2445            2219            2445            1072            1258   {txt}
{txt}{hline 116}
{txt}t statistics in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. esttab using "../Results/Tables/Table_8_Panel_B.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 label interaction(" $\times$ ") ///
>                                 substitute("\_" "_") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "&  \multicolumn{c -(}6{c )-}{c -(}c{c )-}{c -(}\textbf{c -(}Leverage (log){c )-}{c )-}  \\" ///
>                                                                                                                           "\cmidrule{c -(}2-7{c )-} & & & & & Power & Mining \\" ///
>                                                               "\cmidrule(l{c -(}2pt{c )-}){c -(}6-7{c )-}") ///
>                 stats(borrower y cy sy N r2_a , fmt(0 0 0 0 %8.0fc 3) labels("Borrower FE" "Year FE" "Country x Year FE" "Size x Year FE" "Observations" "Adj-R$^2$" ))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_8_Panel_B.tex"'})

{com}.         
. ***Panel C: Total Assets  
. eststo clear
{txt}
{com}. 
. reghdfe log_size ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year) cl(borrower_id)
{res}{txt}(dropped 4 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,622
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    318{txt}){col 67}= {res}      0.08
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.7814
{txt}{col 51}R-squared{col 67}= {res}    0.1429
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0199
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0001
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       319{txt}{col 51}Root MSE{col 67}= {res}    0.9696

{txt}{ralign 97:(Std. err. adjusted for {res:319} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_size{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}  .011905{col 45}{space 2} .0428617{col 56}{space 1}    0.28{col 65}{space 3}0.781{col 73}{space 4}-.0724233{col 86}{space 3} .0962333
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 13.04097{col 45}{space 2}    .0152{col 56}{space 1}  857.96{col 65}{space 3}0.000{col 73}{space 4} 13.01107{col 86}{space 3} 13.07088
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text} borrower_id{col 14}{c |}{space 1}      319{col 27}{space 1}      319{col 39}{result}{space 1}        0{col 53}{text}*{col 54}{c |}
{res}{col 1}{text}        year{col 14}{c |}{space 1}       10{col 27}{space 1}        0{col 39}{result}{space 1}       10{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE4

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:No}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe log_size ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 181 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,445
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    297{txt}){col 67}= {res}      0.01
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.9249
{txt}{col 51}R-squared{col 67}= {res}    0.2439
{txt}{col 51}Adj R-squared{col 67}= {res}   -0.0065
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0000
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       298{txt}{col 51}Root MSE{col 67}= {res}    0.9867

{txt}{ralign 97:(Std. err. adjusted for {res:298} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_size{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.0045566{col 45}{space 2} .0483088{col 56}{space 1}   -0.09{col 65}{space 3}0.925{col 73}{space 4}-.0996275{col 86}{space 3} .0905143
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 13.04747{col 45}{space 2} .0161753{col 56}{space 1}  806.63{col 65}{space 3}0.000{col 73}{space 4} 13.01564{col 86}{space 3} 13.07931
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      298{col 38}{space 1}      298{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      260{col 38}{space 1}       10{col 50}{result}{space 1}      250{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       60{col 38}{space 1}       10{col 50}{result}{space 1}       50{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe log_size i.highshare#c.ss_pre_all_debt_banintsty_n1_sd, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 162 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 10 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,219
{txt}Absorbing 4 HDFE groups{col 51}F({res}   2{txt},{res}    269{txt}){col 67}= {res}      0.13
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.8746
{txt}{col 51}R-squared{col 67}= {res}    0.2622
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0009
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0001
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       270{txt}{col 51}Root MSE{col 67}= {res}    0.9949

{txt}{ralign 99:(Std. err. adjusted for {res:270} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                         log_size{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 24}highshare#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 18}Low Coal Share  {c |}{col 35}{res}{space 2} -.008195{col 47}{space 2}  .061894{col 58}{space 1}   -0.13{col 67}{space 3}0.895{col 75}{space 4}-.1300532{col 88}{space 3} .1136633
{txt}{space 17}High Coal Share  {c |}{col 35}{res}{space 2} .0219371{col 47}{space 2} .0540493{col 58}{space 1}    0.41{col 67}{space 3}0.685{col 75}{space 4}-.0844764{col 88}{space 3} .1283507
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2} 13.03885{col 47}{space 2} .0173848{col 58}{space 1}  750.01{col 67}{space 3}0.000{col 75}{space 4} 13.00462{col 88}{space 3} 13.07308
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      270{col 38}{space 1}      270{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      259{col 38}{space 1}       10{col 50}{result}{space 1}      249{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       60{col 38}{space 1}       10{col 50}{result}{space 1}       50{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe log_size c.ss_pre_all_debt_banintsty_n1_sd#i.median_assets_mean, ///
>     absorb(borrower_id i.count#i.year i.year) cl(borrower_id)
{res}{txt}(dropped 181 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 9 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     2,445
{txt}Absorbing 3 HDFE groups{col 51}F({res}   2{txt},{res}    297{txt}){col 67}= {res}      0.66
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.5197
{txt}{col 51}R-squared{col 67}= {res}    0.2303
{txt}{col 51}Adj R-squared{col 67}= {res}    0.0021
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0006
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       298{txt}{col 51}Root MSE{col 67}= {res}    0.9825

{txt}{ralign 99:(Std. err. adjusted for {res:298} clusters in {res:borrower_id})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                         log_size{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      t{col 67}   P>|t|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 15}median_assets_mean#{c |}
c.ss_pre_all_debt_banintsty_n1_sd {c |}
{space 22}Small Firm  {c |}{col 35}{res}{space 2}-.0481901{col 47}{space 2} .0585712{col 58}{space 1}   -0.82{col 67}{space 3}0.411{col 75}{space 4}-.1634573{col 88}{space 3} .0670771
{txt}{space 22}Large Firm  {c |}{col 35}{res}{space 2} .0164857{col 47}{space 2} .0385792{col 58}{space 1}    0.43{col 67}{space 3}0.669{col 75}{space 4}-.0594376{col 88}{space 3} .0924089
{txt}{space 33} {c |}
{space 28}_cons {c |}{col 35}{res}{space 2} 13.05193{col 47}{space 2} .0138849{col 58}{space 1}  940.01{col 67}{space 3}0.000{col 75}{space 4}  13.0246{col 88}{space 3} 13.07925
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}  borrower_id{col 15}{c |}{space 1}      298{col 28}{space 1}      298{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}      260{col 28}{space 1}        0{col 40}{result}{space 1}      260{col 54}{text} {col 55}{c |}
{res}{col 1}{text}         year{col 15}{c |}{space 1}       10{col 28}{space 1}       10{col 40}{result}{space 1}        0{col 54}{text} {col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3nosy

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:No}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. reghdfe log_size ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==0, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 146 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,072
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    130{txt}){col 67}= {res}      0.09
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.7651
{txt}{col 51}R-squared{col 67}= {res}    0.3210
{txt}{col 51}Adj R-squared{col 67}= {res}   -0.0058
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0001
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       131{txt}{col 51}Root MSE{col 67}= {res}    1.0158

{txt}{ralign 97:(Std. err. adjusted for {res:131} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_size{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2} .0247679{col 45}{space 2} .0827033{col 56}{space 1}    0.30{col 65}{space 3}0.765{col 73}{space 4}-.1388508{col 86}{space 3} .1883865
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 13.05677{col 45}{space 2} .0316786{col 56}{space 1}  412.16{col 65}{space 3}0.000{col 73}{space 4}  12.9941{col 86}{space 3} 13.11944
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      131{col 38}{space 1}      131{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      168{col 38}{space 1}       10{col 50}{result}{space 1}      158{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       59{col 38}{space 1}       10{col 50}{result}{space 1}       49{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est5{txt} stored)

{com}. 
. reghdfe log_size ss_pre_all_debt_banintsty_n1_sd if coal_industry_mining==1, ///
>     absorb(borrower_id year i.count#i.year quintile_assets#i.year) ///
>     cl(borrower_id)
{res}{txt}(dropped 150 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 11 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,258
{txt}Absorbing 4 HDFE groups{col 51}F({res}   1{txt},{res}    153{txt}){col 67}= {res}      1.18
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.2798
{txt}{col 51}R-squared{col 67}= {res}    0.2879
{txt}{col 51}Adj R-squared{col 67}= {res}   -0.0348
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0013
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       154{txt}{col 51}Root MSE{col 67}= {res}    0.9524

{txt}{ralign 97:(Std. err. adjusted for {res:154} clusters in {res:borrower_id})}
{hline 32}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 33}{c |}{col 45}    Robust
{col 1}                       log_size{col 33}{c |} Coefficient{col 45}  std. err.{col 57}      t{col 65}   P>|t|{col 73}     [95% con{col 86}f. interval]
{hline 32}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ss_pre_all_debt_banintsty_n1_sd {c |}{col 33}{res}{space 2}-.0698599{col 45}{space 2} .0644133{col 56}{space 1}   -1.08{col 65}{space 3}0.280{col 73}{space 4}-.1971142{col 86}{space 3} .0573945
{txt}{space 26}_cons {c |}{col 33}{res}{space 2} 13.05965{col 45}{space 2} .0187748{col 56}{space 1}  695.60{col 65}{space 3}0.000{col 73}{space 4} 13.02256{col 86}{space 3} 13.09674
{txt}{hline 32}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 24}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}            Absorbed FE{col 25}{c |} Categories{col 38} - Redundant{col 50}  = Num. Coefs{col 65}{c |}
{res}{col 1}{text}{hline 24}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}            borrower_id{col 25}{c |}{space 1}      154{col 38}{space 1}      154{col 50}{result}{space 1}        0{col 64}{text}*{col 65}{c |}
{res}{col 1}{text}                   year{col 25}{c |}{space 1}       10{col 38}{space 1}        0{col 50}{result}{space 1}       10{col 64}{text} {col 65}{c |}
{res}{col 1}{text}             count#year{col 25}{c |}{space 1}      190{col 38}{space 1}       10{col 50}{result}{space 1}      180{col 64}{text} {col 65}{c |}
{res}{col 1}{text}   quintile_assets#year{col 25}{c |}{space 1}       58{col 38}{space 1}       10{col 50}{result}{space 1}       48{col 64}{text}?{col 65}{c |}
{res}{col 1}{text}{hline 24}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
? = number of redundant parameters may be higher
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE3

{txt}added macro:
           e(borrower) : "{res:Yes}"

added macro:
                  e(y) : "{res:Yes}"

added macro:
                 e(cy) : "{res:Yes}"

added macro:
                 e(sy) : "{res:Yes}"

{com}. eststo
{txt}({res}est6{txt} stored)

{com}. 
. esttab, label starlevels(* .10 ** .05 *** .01) nocons
{res}
{txt}{hline 116}
{txt}                              (1)             (2)             (3)             (4)             (5)             (6)   
{txt}                         log_size        log_size        log_size        log_size        log_size        log_size   
{txt}{hline 116}
{txt}$\text{Bank Exit E~}{res}       0.0119        -0.00456                                          0.0248         -0.0699   {txt}
                    {res} {ralign 12:{txt:(}0.28{txt:)}}    {ralign 12:{txt:(}-0.09{txt:)}}                                    {ralign 12:{txt:(}0.30{txt:)}}    {ralign 12:{txt:(}-1.08{txt:)}}   {txt}

{txt}Low Coal Share # $~i{res}                                     -0.00819                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}-0.13{txt:)}}                                                   {txt}

{txt}High Coal Share # ~x{res}                                       0.0219                                                   {txt}
                    {res}                                 {ralign 12:{txt:(}0.41{txt:)}}                                                   {txt}

{txt}Small Firm # $\tex~x{res}                                                      -0.0482                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}-0.82{txt:)}}                                   {txt}

{txt}Large Firm # $\tex~x{res}                                                       0.0165                                   {txt}
                    {res}                                                 {ralign 12:{txt:(}0.43{txt:)}}                                   {txt}
{txt}{hline 116}
{txt}Observations        {res}         2622            2445            2219            2445            1072            1258   {txt}
{txt}{hline 116}
{txt}t statistics in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. esttab using "../Results/Tables/Table_8_Panel_C.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 label interaction(" $\times$ ") ///
>                                 substitute("\_" "_") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "&  \multicolumn{c -(}6{c )-}{c -(}c{c )-}{c -(}\textbf{c -(}Total Assets (log){c )-}{c )-}  \\" ///
>                                                                                                                           "\cmidrule{c -(}2-7{c )-} & & & & & Power & Mining \\" ///
>                                                               "\cmidrule(l{c -(}2pt{c )-}){c -(}6-7{c )-}") ///
>                 stats(borrower y cy sy N r2_a , fmt(0 0 0 0 %8.0fc 3) labels("Borrower FE" "Year FE" "Country x Year FE" "Size x Year FE" "Observations" "Adj-R$^2$" ))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_8_Panel_C.tex"'})

{com}.                                 
. ********************************************************************************
. ********************************************************************************
. * Table 9: Facility Level Effects
. ********************************************************************************
. ********************************************************************************
. //Panel A: Effects on Coal-fired Power Plant Closures
. use ../Intermediate/plant_year_panel_clean, clear
{txt}
{com}. 
. *Setting up Cox Model
. stset year, failure(retired) id(plant_parent_id) origin(first_date_Operating_year) 

{txt}Survival-time data settings

{col 12}ID variable: {res}plant_parent_id
{col 10}{txt}Failure event: {res}retired!=0 & retired<.
{col 1}{txt}Observed time interval: {res}(year[_n-1], year]
{col 6}{txt}Exit on or before: {res}failure
{col 6}{txt}Time for analysis: {res}(time-origin)
{col 17}{txt}Origin: {res}time first_date_Operating_year

{txt}{hline 74}
{res}     53,534{txt}  total observations
{res}     10,348{txt}  ignored because never entered
{res}      6,729{txt}  observations end on or before {bf:enter()}
{res}      7,058{txt}  observations begin on or after (first) failure
{hline 74}
{res}     29,399{txt}  observations remaining, representing
{res}      3,153{txt}  subjects
{res}      1,029{txt}  failures in single-failure-per-subject data
{res}     99,174{txt}  total analysis time at risk and under observation
                                                At risk from t = {res}        0
                                     {txt}Earliest observed entry t = {res}        0
                                          {txt}Last observed exit t = {res}       74
{txt}
{com}. local clvar Country
{txt}
{com}. 
. eststo clear
{txt}
{com}. 
. stcox ban_intensity_max_sd if year < 2015, strata(Country) vce(cl ParentID_GCEL)

{col 9}{txt}Failure {bf:_d}: {res}retired
{col 3}{txt}Analysis time {bf:_t}: {res}(year-origin)
{col 13}{txt}Origin: {res}time first_date_Operating_year
{col 8}{txt}ID variable: {res}plant_parent_id

{txt}Iteration 0:  Log pseudolikelihood = {res}-2178.0192
{txt}Iteration 1:  Log pseudolikelihood = {res}-2176.2343
{txt}Iteration 2:  Log pseudolikelihood = {res}-2176.2339
{txt}Refining estimates:
Iteration 0:  Log pseudolikelihood = {res}-2176.2339

{txt}Stratified Cox regression with Breslow method for ties
Strata variable: {res:Country}

No. of subjects = {res}{ralign 6:2,755}{col 57}{txt}{lalign 13:Number of obs} = {res}{ralign 6:13,704}
{txt}No. of failures = {res}{ralign 6:495}
{txt}Time at risk    = {res}{ralign 6:83,479}
{col 57}{txt}{lalign 13:Wald chi2({res:1})} = {res}{ralign 6:1.01}
{txt}Log pseudolikelihood = {res}-2176.2339{col 57}{txt}{lalign 13:Prob > chi2} = {res}{ralign 6:0.3145}

{txt}{ralign 86:(Std. err. adjusted for {res:192} clusters in {res:ParentID_GCEL})}
{hline 21}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 22}{c |}{col 34}    Robust
{col 1}                  _t{col 22}{c |} Haz. ratio{col 34}   std. err.{col 46}      z{col 54}   P>|z|{col 62}     [95% con{col 75}f. interval]
{hline 21}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
ban_intensity_max_sd {c |}{col 22}{res}{space 2}   1.1922{col 34}{space 2} .2083887{col 45}{space 1}    1.01{col 54}{space 3}0.315{col 62}{space 4} .8463783{col 75}{space 3}  1.67932
{txt}{hline 21}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. FE_cy 

{txt}added macro:
            e(country) : "{res:Yes}"

{com}. eststo 
{txt}({res}est1{txt} stored)

{com}. 
. stcox c.post2015##c.ban_intensity_max_sd, strata(country_i) vce(cl ParentID_GCEL) nohr

{col 9}{txt}Failure {bf:_d}: {res}retired
{col 3}{txt}Analysis time {bf:_t}: {res}(year-origin)
{col 13}{txt}Origin: {res}time first_date_Operating_year
{col 8}{txt}ID variable: {res}plant_parent_id

{txt}Iteration 0:  Log pseudolikelihood = {res}-4823.0817
{txt}Iteration 1:  Log pseudolikelihood = {res}-4755.8479
{txt}Iteration 2:  Log pseudolikelihood = {res}-4754.1266
{txt}Iteration 3:  Log pseudolikelihood = {res}-4754.1264
{txt}Refining estimates:
Iteration 0:  Log pseudolikelihood = {res}-4754.1264

{txt}Stratified Cox regression with Breslow method for ties
Strata variable: {res:country_i}

No. of subjects = {res}{ralign 6:3,153}{col 57}{txt}{lalign 13:Number of obs} = {res}{ralign 6:29,399}
{txt}No. of failures = {res}{ralign 6:1,029}
{txt}Time at risk    = {res}{ralign 6:99,174}
{col 57}{txt}{lalign 13:Wald chi2({res:3})} = {res}{ralign 6:43.39}
{txt}Log pseudolikelihood = {res}-4754.1264{col 57}{txt}{lalign 13:Prob > chi2} = {res}{ralign 6:0.0000}

{txt}{ralign 99:(Std. err. adjusted for {res:215} clusters in {res:ParentID_GCEL})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                               _t{col 35}{c |} Coefficient{col 47}  std. err.{col 59}      z{col 67}   P>|z|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 25}post2015 {c |}{col 35}{res}{space 2} .7035003{col 47}{space 2} .2413074{col 58}{space 1}    2.92{col 67}{space 3}0.004{col 75}{space 4} .2305464{col 88}{space 3} 1.176454
{txt}{space 13}ban_intensity_max_sd {c |}{col 35}{res}{space 2} .0269908{col 47}{space 2} .1407902{col 58}{space 1}    0.19{col 67}{space 3}0.848{col 75}{space 4}-.2489529{col 88}{space 3} .3029345
{txt}{space 33} {c |}
c.post2015#c.ban_intensity_max_sd {c |}{col 35}{res}{space 2}  .127714{col 47}{space 2} .1580205{col 58}{space 1}    0.81{col 67}{space 3}0.419{col 75}{space 4}-.1820006{col 88}{space 3} .4374285
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. FE_cy 

{txt}added macro:
            e(country) : "{res:Yes}"

{com}. eststo 
{txt}({res}est2{txt} stored)

{com}. 
. stcox c.post2015##c.ban_intensity_max_sd##c.small_firm, strata(Country) vce(cl ParentID_GCEL) 

{col 9}{txt}Failure {bf:_d}: {res}retired
{col 3}{txt}Analysis time {bf:_t}: {res}(year-origin)
{col 13}{txt}Origin: {res}time first_date_Operating_year
{col 8}{txt}ID variable: {res}plant_parent_id

{txt}Iteration 0:  Log pseudolikelihood = {res}-4823.0817
{txt}Iteration 1:  Log pseudolikelihood = {res}-4750.9144
{txt}Iteration 2:  Log pseudolikelihood = {res}-4746.9042
{txt}Iteration 3:  Log pseudolikelihood = {res}-4746.8992
{txt}Refining estimates:
Iteration 0:  Log pseudolikelihood = {res}-4746.8992

{txt}Stratified Cox regression with Breslow method for ties
Strata variable: {res:Country}

No. of subjects = {res}{ralign 6:3,153}{col 57}{txt}{lalign 13:Number of obs} = {res}{ralign 6:29,399}
{txt}No. of failures = {res}{ralign 6:1,029}
{txt}Time at risk    = {res}{ralign 6:99,174}
{col 57}{txt}{lalign 13:Wald chi2({res:7})} = {res}{ralign 6:49.47}
{txt}Log pseudolikelihood = {res}-4746.8992{col 57}{txt}{lalign 13:Prob > chi2} = {res}{ralign 6:0.0000}

{txt}{ralign 100:(Std. err. adjusted for {res:215} clusters in {res:ParentID_GCEL})}
{hline 35}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 36}{c |}{col 48}    Robust
{col 1}                                _t{col 36}{c |} Haz. ratio{col 48}   std. err.{col 60}      z{col 68}   P>|z|{col 76}     [95% con{col 89}f. interval]
{hline 35}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 26}post2015 {c |}{col 36}{res}{space 2} 1.583607{col 48}{space 2} .4877428{col 59}{space 1}    1.49{col 68}{space 3}0.136{col 76}{space 4} .8659274{col 89}{space 3} 2.896097
{txt}{space 14}ban_intensity_max_sd {c |}{col 36}{res}{space 2} 1.056762{col 48}{space 2} .1288817{col 59}{space 1}    0.45{col 68}{space 3}0.651{col 76}{space 4} .8320811{col 89}{space 3} 1.342113
{txt}{space 34} {c |}
{space 1}c.post2015#c.ban_intensity_max_sd {c |}{col 36}{res}{space 2}  1.38264{col 48}{space 2} .2625928{col 59}{space 1}    1.71{col 68}{space 3}0.088{col 76}{space 4} .9529012{col 89}{space 3} 2.006183
{txt}{space 34} {c |}
{space 24}small_firm {c |}{col 36}{res}{space 2} 1.080034{col 48}{space 2} .3078118{col 59}{space 1}    0.27{col 68}{space 3}0.787{col 76}{space 4} .6177934{col 89}{space 3} 1.888128
{txt}{space 34} {c |}
{space 11}c.post2015#c.small_firm {c |}{col 36}{res}{space 2} 1.598583{col 48}{space 2} .8085557{col 59}{space 1}    0.93{col 68}{space 3}0.354{col 76}{space 4} .5932006{col 89}{space 3} 4.307932
{txt}{space 34} {c |}
{space 12}c.ban_intensity_max_sd#{c |}
{space 22}c.small_firm {c |}{col 36}{res}{space 2} .9363773{col 48}{space 2} .2039074{col 59}{space 1}   -0.30{col 68}{space 3}0.763{col 76}{space 4} .6110708{col 89}{space 3} 1.434862
{txt}{space 34} {c |}
{space 1}c.post2015#c.ban_intensity_max_sd#{c |}
{space 22}c.small_firm {c |}{col 36}{res}{space 2} .6381169{col 48}{space 2} .2235016{col 59}{space 1}   -1.28{col 68}{space 3}0.200{col 76}{space 4} .3211925{col 89}{space 3} 1.267754
{txt}{hline 35}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. FE_cy 

{txt}added macro:
            e(country) : "{res:Yes}"

{com}. eststo 
{txt}({res}est3{txt} stored)

{com}. 
. stcox c.post2015##c.ban_intensity_max_sd##c.share_low, strata(Country)  vce(cl ParentID_GCEL) 

{col 9}{txt}Failure {bf:_d}: {res}retired
{col 3}{txt}Analysis time {bf:_t}: {res}(year-origin)
{col 13}{txt}Origin: {res}time first_date_Operating_year
{col 8}{txt}ID variable: {res}plant_parent_id

{txt}Iteration 0:  Log pseudolikelihood = {res}-4746.0596
{txt}Iteration 1:  Log pseudolikelihood = {res}-4672.5332
{txt}Iteration 2:  Log pseudolikelihood = {res}-4667.5248
{txt}Iteration 3:  Log pseudolikelihood = {res}-4667.5186
{txt}Iteration 4:  Log pseudolikelihood = {res}-4667.5186
{txt}Refining estimates:
Iteration 0:  Log pseudolikelihood = {res}-4667.5186

{txt}Stratified Cox regression with Breslow method for ties
Strata variable: {res:Country}

No. of subjects = {res}{ralign 6:3,086}{col 57}{txt}{lalign 13:Number of obs} = {res}{ralign 6:28,709}
{txt}No. of failures = {res}{ralign 6:1,010}
{txt}Time at risk    = {res}{ralign 6:97,719}
{col 57}{txt}{lalign 13:Wald chi2({res:7})} = {res}{ralign 6:72.87}
{txt}Log pseudolikelihood = {res}-4667.5186{col 57}{txt}{lalign 13:Prob > chi2} = {res}{ralign 6:0.0000}

{txt}{ralign 100:(Std. err. adjusted for {res:208} clusters in {res:ParentID_GCEL})}
{hline 35}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 36}{c |}{col 48}    Robust
{col 1}                                _t{col 36}{c |} Haz. ratio{col 48}   std. err.{col 60}      z{col 68}   P>|z|{col 76}     [95% con{col 89}f. interval]
{hline 35}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 26}post2015 {c |}{col 36}{res}{space 2} 2.386154{col 48}{space 2} .7701546{col 59}{space 1}    2.69{col 68}{space 3}0.007{col 76}{space 4}  1.26755{col 89}{space 3} 4.491921
{txt}{space 14}ban_intensity_max_sd {c |}{col 36}{res}{space 2} .9439628{col 48}{space 2} .2496434{col 59}{space 1}   -0.22{col 68}{space 3}0.827{col 76}{space 4} .5621385{col 89}{space 3} 1.585135
{txt}{space 34} {c |}
{space 1}c.post2015#c.ban_intensity_max_sd {c |}{col 36}{res}{space 2} .9711225{col 48}{space 2} .2408037{col 59}{space 1}   -0.12{col 68}{space 3}0.906{col 76}{space 4} .5973192{col 89}{space 3} 1.578853
{txt}{space 34} {c |}
{space 25}share_low {c |}{col 36}{res}{space 2} .7365605{col 48}{space 2}  .216726{col 59}{space 1}   -1.04{col 68}{space 3}0.299{col 76}{space 4} .4137618{col 89}{space 3} 1.311192
{txt}{space 34} {c |}
{space 12}c.post2015#c.share_low {c |}{col 36}{res}{space 2} .3720024{col 48}{space 2} .1632343{col 59}{space 1}   -2.25{col 68}{space 3}0.024{col 76}{space 4} .1574126{col 89}{space 3} .8791279
{txt}{space 34} {c |}
c.ban_intensity_max_sd#c.share_low {c |}{col 36}{res}{space 2} 1.117469{col 48}{space 2}  .304459{col 59}{space 1}    0.41{col 68}{space 3}0.684{col 76}{space 4} .6551222{col 89}{space 3} 1.906114
{txt}{space 34} {c |}
{space 1}c.post2015#c.ban_intensity_max_sd#{c |}
{space 23}c.share_low {c |}{col 36}{res}{space 2}  1.80232{col 48}{space 2} .5329173{col 59}{space 1}    1.99{col 68}{space 3}0.046{col 76}{space 4} 1.009591{col 89}{space 3} 3.217501
{txt}{hline 35}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. FE_cy 

{txt}added macro:
            e(country) : "{res:Yes}"

{com}. eststo 
{txt}({res}est4{txt} stored)

{com}. 
. stcox c.post2015##c.ban_intensity_max_sd##c.big_plant, strata(Country)  vce(cl ParentID_GCEL) 

{col 9}{txt}Failure {bf:_d}: {res}retired
{col 3}{txt}Analysis time {bf:_t}: {res}(year-origin)
{col 13}{txt}Origin: {res}time first_date_Operating_year
{col 8}{txt}ID variable: {res}plant_parent_id

{txt}Iteration 0:  Log pseudolikelihood = {res}-4823.0817
{txt}Iteration 1:  Log pseudolikelihood = {res}-4746.7236
{txt}Iteration 2:  Log pseudolikelihood = {res}-4743.9678
{txt}Iteration 3:  Log pseudolikelihood = {res}-4743.9651
{txt}Iteration 4:  Log pseudolikelihood = {res}-4743.9651
{txt}Refining estimates:
Iteration 0:  Log pseudolikelihood = {res}-4743.9651

{txt}Stratified Cox regression with Breslow method for ties
Strata variable: {res:Country}

No. of subjects = {res}{ralign 6:3,153}{col 57}{txt}{lalign 13:Number of obs} = {res}{ralign 6:29,399}
{txt}No. of failures = {res}{ralign 6:1,029}
{txt}Time at risk    = {res}{ralign 6:99,174}
{col 57}{txt}{lalign 13:Wald chi2({res:7})} = {res}{ralign 6:53.68}
{txt}Log pseudolikelihood = {res}-4743.9651{col 57}{txt}{lalign 13:Prob > chi2} = {res}{ralign 6:0.0000}

{txt}{ralign 100:(Std. err. adjusted for {res:215} clusters in {res:ParentID_GCEL})}
{hline 35}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 36}{c |}{col 48}    Robust
{col 1}                                _t{col 36}{c |} Haz. ratio{col 48}   std. err.{col 60}      z{col 68}   P>|z|{col 76}     [95% con{col 89}f. interval]
{hline 35}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 26}post2015 {c |}{col 36}{res}{space 2} 2.262288{col 48}{space 2} .5423189{col 59}{space 1}    3.41{col 68}{space 3}0.001{col 76}{space 4} 1.414154{col 89}{space 3} 3.619088
{txt}{space 14}ban_intensity_max_sd {c |}{col 36}{res}{space 2} 1.023345{col 48}{space 2} .1443858{col 59}{space 1}    0.16{col 68}{space 3}0.870{col 76}{space 4} .7761117{col 89}{space 3} 1.349335
{txt}{space 34} {c |}
{space 1}c.post2015#c.ban_intensity_max_sd {c |}{col 36}{res}{space 2} 1.066551{col 48}{space 2} .1709297{col 59}{space 1}    0.40{col 68}{space 3}0.688{col 76}{space 4} .7790485{col 89}{space 3} 1.460154
{txt}{space 34} {c |}
{space 25}big_plant {c |}{col 36}{res}{space 2} .4585949{col 48}{space 2} .3100705{col 59}{space 1}   -1.15{col 68}{space 3}0.249{col 76}{space 4} .1218723{col 89}{space 3} 1.725653
{txt}{space 34} {c |}
{space 12}c.post2015#c.big_plant {c |}{col 36}{res}{space 2} .5296999{col 48}{space 2} .3334679{col 59}{space 1}   -1.01{col 68}{space 3}0.313{col 76}{space 4} .1542281{col 89}{space 3} 1.819266
{txt}{space 34} {c |}
c.ban_intensity_max_sd#c.big_plant {c |}{col 36}{res}{space 2} 1.087414{col 48}{space 2} .3637327{col 59}{space 1}    0.25{col 68}{space 3}0.802{col 76}{space 4} .5645127{col 89}{space 3} 2.094673
{txt}{space 34} {c |}
{space 1}c.post2015#c.ban_intensity_max_sd#{c |}
{space 23}c.big_plant {c |}{col 36}{res}{space 2} 1.835409{col 48}{space 2} .6393542{col 59}{space 1}    1.74{col 68}{space 3}0.081{col 76}{space 4} .9273029{col 89}{space 3} 3.632821
{txt}{hline 35}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. FE_cy 

{txt}added macro:
            e(country) : "{res:Yes}"

{com}. eststo 
{txt}({res}est5{txt} stored)

{com}. 
. esttab, starlevels(* .10 ** .05 *** .01) eform t(%8.3f) label drop(c.ban_intensity_max_sd#c.small_firm c.ban_intensity_max_sd#c.share_low c.ban_intensity_max_sd#c.big_plant post2015 big_plant small_firm c.post2015#c.big_plant c.post2015#c.small_firm  c.post2015#c.share_low share_low) interaction(" $\times$ ")
{res}
{txt}{hline 100}
{txt}                              (1)             (2)             (3)             (4)             (5)   
{txt}                     Analysis t~s    Analysis t~s    Analysis t~s    Analysis t~s    Analysis t~s   
{txt}{hline 100}
{txt}$\text{Bank Exit E~}{res}        1.192           1.027           1.057           0.944           1.023   {txt}
                    {res} {ralign 12:{txt:(}1.006{txt:)}}    {ralign 12:{txt:(}0.192{txt:)}}    {ralign 12:{txt:(}0.453{txt:)}}    {ralign 12:{txt:(}-0.218{txt:)}}    {ralign 12:{txt:(}0.164{txt:)}}   {txt}

{txt}$ Year \geq 2015$ ~x{res}                        1.136           1.383*          0.971           1.067   {txt}
                    {res}                 {ralign 12:{txt:(}0.808{txt:)}}    {ralign 12:{txt:(}1.706{txt:)}}    {ralign 12:{txt:(}-0.118{txt:)}}    {ralign 12:{txt:(}0.402{txt:)}}   {txt}

{txt}$ Year \geq 2015$ ~x{res}                                        0.638                                   {txt}
                    {res}                                 {ralign 12:{txt:(}-1.283{txt:)}}                                   {txt}

{txt}$ Year \geq 2015$ ~x{res}                                                        1.802**                 {txt}
                    {res}                                                 {ralign 12:{txt:(}1.992{txt:)}}                   {txt}

{txt}$ Year \geq 2015$ ~x{res}                                                                        1.835*  {txt}
                    {res}                                                                 {ralign 12:{txt:(}1.743{txt:)}}   {txt}
{txt}{hline 100}
{txt}Observations        {res}        13704           29399           29399           28709           29399   {txt}
{txt}{hline 100}
{txt}Exponentiated coefficients; t statistics in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. 
. esttab using "../Results/Tables/Table_9_Panel_A.tex", replace booktabs b(%8.3f) t(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 eform label substitute("\_" "_") interaction(" $\times$ ") ///
>                 drop(c.ban_intensity_max_sd#c.small_firm c.ban_intensity_max_sd#c.share_low c.ban_intensity_max_sd#c.big_plant post2015 big_plant small_firm c.post2015#c.big_plant c.post2015#c.small_firm  c.post2015#c.share_low share_low) ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}@M{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "& \multicolumn{c -(}5{c )-}{c -(}c{c )-}{c -(}Plant Closure{c )-} \\" ///
>                                                               "\cmidrule{c -(}2-6{c )-}" ///
>                                                               "& \multicolumn{c -(}1{c )-}{c -(}c{c )-}{c -(}Pre-Period{c )-} & \multicolumn{c -(}4{c )-}{c -(}c{c )-}{c -(}Full Sample{c )-} \\" ///
>                                                               "\cmidrule(l{c -(}2pt{c )-}){c -(}2-2{c )-} \cmidrule(l{c -(}2pt{c )-}){c -(}3-6{c )-}") ///
>                 stats(country N, fmt( 0 0 %8.0fc) labels("Country Strata" "Observations"))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_9_Panel_A.tex"'})

{com}.                 
. //Panel B: Effects on Coal-fired Power Plant CO2 Emissions
. use "../Intermediate/Coal_Plant_Emissions", clear
{txt}
{com}. eststo clear
{txt}
{com}.        
. reghdfe co2_scaled treatment_2015, absorb(newid i.count#i.year ) cl(year newid )  
{res}{txt}(dropped 39 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,616
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}     12{txt}){col 67}= {res}      2.92
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1131
{txt}{col 51}R-squared{col 67}= {res}    0.5561
{txt}{col 51}Adj R-squared{col 67}= {res}    0.4931
{txt}{col 1}Number of clusters ({res}year{txt}) {col 30}= {res}        13{txt}{col 51}Within R-sq.{col 67}= {res}    0.0047
{txt}{col 1}Number of clusters ({res}newid{txt}) {col 30}= {res}       326{txt}{col 51}Root MSE{col 67}= {res}    0.3369

{txt}{ralign 80:(Std. err. adjusted for {res:13} clusters in {res:year newid})}
{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 16}{c |}{col 28}    Robust
{col 1}    co2_scaled{col 16}{c |} Coefficient{col 28}  std. err.{col 40}      t{col 48}   P>|t|{col 56}     [95% con{col 69}f. interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
treatment_2015 {c |}{col 16}{res}{space 2}-.0511325{col 28}{space 2} .0299154{col 39}{space 1}   -1.71{col 48}{space 3}0.113{col 56}{space 4}-.1163125{col 69}{space 3} .0140476
{txt}{space 9}_cons {c |}{col 16}{res}{space 2} .9024921{col 28}{space 2} .0280647{col 39}{space 1}   32.16{col 48}{space 3}0.000{col 56}{space 4} .8413445{col 69}{space 3} .9636398
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        newid{col 15}{c |}{space 1}      326{col 28}{space 1}      326{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}      123{col 28}{space 1}      123{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est1{txt} stored)

{com}. 
. reghdfe co2_scaled  treatment_2015 if active == 1, absorb(newid i.count#i.year ) cl(year newid )
{res}{txt}(dropped 42 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,279
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}     12{txt}){col 67}= {res}      2.36
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1505
{txt}{col 51}R-squared{col 67}= {res}    0.5391
{txt}{col 51}Adj R-squared{col 67}= {res}    0.4673
{txt}{col 1}Number of clusters ({res}year{txt}) {col 30}= {res}        13{txt}{col 51}Within R-sq.{col 67}= {res}    0.0031
{txt}{col 1}Number of clusters ({res}newid{txt}) {col 30}= {res}       325{txt}{col 51}Root MSE{col 67}= {res}    0.2974

{txt}{ralign 80:(Std. err. adjusted for {res:13} clusters in {res:year newid})}
{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 16}{c |}{col 28}    Robust
{col 1}    co2_scaled{col 16}{c |} Coefficient{col 28}  std. err.{col 40}      t{col 48}   P>|t|{col 56}     [95% con{col 69}f. interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
treatment_2015 {c |}{col 16}{res}{space 2}-.0360773{col 28}{space 2} .0234863{col 39}{space 1}   -1.54{col 48}{space 3}0.150{col 56}{space 4}-.0872496{col 69}{space 3}  .015095
{txt}{space 9}_cons {c |}{col 16}{res}{space 2} .9712795{col 28}{space 2} .0200373{col 39}{space 1}   48.47{col 48}{space 3}0.000{col 56}{space 4} .9276221{col 69}{space 3} 1.014937
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        newid{col 15}{c |}{space 1}      325{col 28}{space 1}      325{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}      117{col 28}{space 1}      117{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est2{txt} stored)

{com}. 
. reghdfe active treatment_2015, absorb(newid i.count#i.year ) cl(newid)
{res}{txt}(dropped 39 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 6 iterations)
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,679
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}    330{txt}){col 67}= {res}      2.66
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.1036
{txt}{col 51}R-squared{col 67}= {res}    0.4836
{txt}{col 51}Adj R-squared{col 67}= {res}    0.4109
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0029
{txt}{col 1}Number of clusters ({res}newid{txt}) {col 30}= {res}       331{txt}{col 51}Root MSE{col 67}= {res}    0.2193

{txt}{ralign 80:(Std. err. adjusted for {res:331} clusters in {res:newid})}
{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 16}{c |}{col 28}    Robust
{col 1}        active{col 16}{c |} Coefficient{col 28}  std. err.{col 40}      t{col 48}   P>|t|{col 56}     [95% con{col 69}f. interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
treatment_2015 {c |}{col 16}{res}{space 2}-.0261598{col 28}{space 2} .0160279{col 39}{space 1}   -1.63{col 48}{space 3}0.104{col 56}{space 4}-.0576895{col 69}{space 3} .0053699
{txt}{space 9}_cons {c |}{col 16}{res}{space 2} .9350244{col 28}{space 2} .0151474{col 39}{space 1}   61.73{col 48}{space 3}0.000{col 56}{space 4} .9052268{col 69}{space 3}  .964822
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        newid{col 15}{c |}{space 1}      331{col 28}{space 1}      331{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}      123{col 28}{space 1}        0{col 40}{result}{space 1}      123{col 54}{text} {col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est3{txt} stored)

{com}. 
. reghdfe co2_intensity_win treatment_2015, absorb(newid i.count#i.year ) cl(newid year) 
{res}{txt}(dropped 14 {browse "http://scorreia.com/research/singletons.pdf":singleton observations})
{res}{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 7 iterations)
{res}{txt}Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     1,915
{txt}Absorbing 2 HDFE groups{col 51}F({res}   1{txt},{res}     10{txt}){col 67}= {res}      0.96
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.3507
{txt}{col 51}R-squared{col 67}= {res}    0.7645
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7213
{txt}{col 1}Number of clusters ({res}newid{txt}) {col 30}= {res}       238{txt}{col 51}Within R-sq.{col 67}= {res}    0.0003
{txt}{col 1}Number of clusters ({res}year{txt}) {col 30}= {res}        11{txt}{col 51}Root MSE{col 67}= {res}    0.2188

{txt}{ralign 80:(Std. err. adjusted for {res:11} clusters in {res:newid year})}
{hline 15}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 16}{c |}{col 28}    Robust
{col 1}co2_intensit~n{col 16}{c |} Coefficient{col 28}  std. err.{col 40}      t{col 48}   P>|t|{col 56}     [95% con{col 69}f. interval]
{hline 15}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
treatment_2015 {c |}{col 16}{res}{space 2}-.0124053{col 28}{space 2} .0126719{col 39}{space 1}   -0.98{col 48}{space 3}0.351{col 56}{space 4}-.0406401{col 69}{space 3} .0158294
{txt}{space 9}_cons {c |}{col 16}{res}{space 2} 1.075961{col 28}{space 2} .0127683{col 39}{space 1}   84.27{col 48}{space 3}0.000{col 56}{space 4} 1.047512{col 69}{space 3} 1.104411
{txt}{hline 15}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 14}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text}  Absorbed FE{col 15}{c |} Categories{col 28} - Redundant{col 40}  = Num. Coefs{col 55}{c |}
{res}{col 1}{text}{hline 14}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text}        newid{col 15}{c |}{space 1}      238{col 28}{space 1}      238{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}   count#year{col 15}{c |}{space 1}       59{col 28}{space 1}       59{col 40}{result}{space 1}        0{col 54}{text}*{col 55}{c |}
{res}{col 1}{text}{hline 14}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. FE1

{txt}added macro:
      e(borrower_year) : "{res:Yes}"

added macro:
               e(bank) : "{res:Yes}"

{com}. eststo
{txt}({res}est4{txt} stored)

{com}. 
. 
. esttab, label starlevels(* .10 ** .05 *** .01) nocons
{res}
{txt}{hline 84}
{txt}                              (1)             (2)             (3)             (4)   
{txt}                       co2_scaled      co2_scaled          active       co2_i..01   
{txt}{hline 84}
{txt}$\text{Bank Exit E~}{res}      -0.0511         -0.0361         -0.0262         -0.0124   {txt}
                    {res} {ralign 12:{txt:(}-1.71{txt:)}}    {ralign 12:{txt:(}-1.54{txt:)}}    {ralign 12:{txt:(}-1.63{txt:)}}    {ralign 12:{txt:(}-0.98{txt:)}}   {txt}
{txt}{hline 84}
{txt}Observations        {res}         3616            3279            3679            1915   {txt}
{txt}{hline 84}
{txt}t statistics in parentheses
{txt}* p<.10, ** p<.05, *** p<.01

{com}. 
. esttab using "../Results/Tables/Table_9_Panel_B.tex", replace booktabs b(%8.3f) se(%8.3f)  ///
>                 nocons nonotes starlevels(* .10 ** .05 *** .01) nolegend numbers ///
>                 label interaction(" $\times$ ") substitute("\_" "_") ///
>                 nomtitles prehead("{c -(} \def\sym#1{c -(}\ifmmode^{c -(}#1{c )-}\else\(^{c -(}#1{c )-}\)\fi{c )-}" ///
>                                                               "\begin{c -(}tabular{c )-}{c -(}l*{c -(}4{c )-}{c -(}r{c )-}{c )-}" ///
>                                                               "\toprule" ///
>                                                               "& \multicolumn{c -(}1{c )-}{c -(}c{c )-}{c -(}Emissions{c )-} & \multicolumn{c -(}1{c )-}{c -(}c{c )-}{c -(}Active Facilities Only{c )-} & \multicolumn{c -(}1{c )-}{c -(}c{c )-}{c -(}Active (1/0){c )-} & \multicolumn{c -(}1{c )-}{c -(}c{c )-}{c -(}Carbon Intensity{c )-}\\" ///
>                                                               "\cmidrule{c -(}2-5{c )-}" ) ///
>                 stats(borrower cy N r2_a , fmt( 0 0 %8.0fc 3) labels("Facility FE" "Country x Year FE" "Observations" "Adj-R$^2$" ))
{res}{txt}(output written to {browse  `"../Results/Tables/Table_9_Panel_B.tex"'})

{com}. 
. {txt}
{com}. 
. //This file produces all main figures in the paper
. include "../Data_Cleaning/Analysis_Number_Banks.do" //Prepare Figure 1
{txt}
{com}. import excel "../Raw/Yann_Louvel_Reclaim_Finance/Banks coal policies history extracted.xlsx", first clear sheet("Feuil1")
{res}{text}(21 vars, 126 obs)

{com}. destring Year, ignore("Unknown") replace
{txt}Year: characters{res} U n k o w{txt} removed; {res}replaced {txt}as {res}int
{txt}(5 missing values generated)
{res}{txt}
{com}. 
. *Finding first date policy adopted
. drop if Chronology != "First policy" | missing(Year)
{txt}(45 observations deleted)

{com}. 
. // keep BankId Done Year
. set scheme s1color
{txt}
{com}. replace Day = 1 if missing(Day)
{txt}(35 real changes made)

{com}. replace Month = 1 if missing(Month)
{txt}(15 real changes made)

{com}. gen date = mdy(Month,Day,Year)
{txt}
{com}. 
. preserve
{txt}
{com}. clear
{txt}
{com}. input qdate cumulative

     {txt}    qdate  cumulat~e
  1{com}. 210 0
{txt}  2{com}. 211 0
{txt}  3{com}. 212 0
{txt}  4{com}. 213 0
{txt}  5{com}. 214 0
{txt}  6{com}. 215 0
{txt}  7{com}. 216 0
{txt}  8{com}. end
{txt}
{com}. tempfile linestart
{txt}
{com}. save `linestart'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002w{rm}
saved
as .dta format
{p_end}

{com}. restore
{txt}
{com}. 
. gen qdate = qofd(date)
{txt}
{com}. format qdate %tq
{txt}
{com}. format date %td
{txt}
{com}. collapse (count) BankId, by(qdate)
{res}{txt}
{com}. gen cumulative = sum(BankId)
{txt}
{com}. append using `linestart'
{txt}
{com}. drop if missing(qdate)
{txt}(0 observations deleted)

{com}. format qdate %tqCCYY
{txt}
{com}. sort qdate 
{txt}
{com}. 
. save "../Intermediate/Figure_1_Data", replace 
{txt}{p 0 4 2}
(file {bf}
../Intermediate/Figure_1_Data.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/Figure_1_Data.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. include "../Data_Cleaning/Analysis_Bank_Exit_Policies_By_Type.do" //Prepare Figure 3
{txt}
{com}. 
. use ../Intermediate/broad_scenarios_bank_year_ban, clear
{txt}
{com}. unique BankID 
{txt}Number of unique values of BankID is  {res}77
{txt}Number of records is  {res}10164
{txt}
{com}. local nbanks = r(unique)
{txt}
{com}. di "`nbanks'"
{res}77
{txt}
{com}. collapse (sum) ban, by(scenario scenario_str year)
{res}{txt}
{com}. gen pct_ban = 100*ban/`nbanks'
{txt}
{com}. 
. encode scenario_str, gen(sceni)
{txt}
{com}. 
. save "../Intermediate/Figure_3", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/Figure_3.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/Figure_3.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. include "../Data_Cleaning/Analysis_Loan_Issuance_By_Exit_Policy.do" //Prepare Figure 5
{txt}
{com}. use "../Intermediate/bank_lending_panel", clear
{txt}
{com}. 
. bys BankID: egen total_debt = total(debt)
{txt}
{com}. drop if total_debt == 0
{txt}(201,120 observations deleted)

{com}. 
. gen grp = strong_policy_new1_max == 1
{txt}
{com}. 
. collapse (sum) loan, by(grp year)
{res}{txt}
{com}. 
. tsset grp year
{res}
{col 1}{txt:Panel variable: }{res:grp}{txt: (strongly balanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:2006}}{txt: to }{res:{bind:2021}}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. replace loan    = loan/1e3
{txt}(32 real changes made)

{com}. tssmooth ma loan_ma = loan, window(2 1)
{txt}The smoother applied was
{res}{p 5 5 5} by grp : (1/3)*[x(t-2) + x(t-1) + 1*x(t)]; x(t)= loan{p_end}
{txt}Note: Missing values are given a weight of zero in the smoother.

{com}. 
. bys grp: gen base_loan = loan_ma if year == 2010
{txt}(30 missing values generated)

{com}. bys grp: egen baseline = max(base_loan)
{txt}
{com}. gen loan_ma_sc = loan_ma / baseline
{txt}
{com}. label var loan_ma_sc "Coal Aggregate Loan Issuance"
{txt}
{com}. sort grp year
{txt}
{com}. save "../Intermediate/Figure_5", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/Figure_5.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/Figure_5.dta{rm}
saved
{p_end}

{com}. 
. {txt}
{com}. include "../Data_Cleaning/Analysis_Loan_Issuance_by_Borrower.do" //Prepare Figure 6
{txt}
{com}. use "../Intermediate/analysis_panel_firmyear", clear
{txt}
{com}. 
. bys borrower_id: egen total_treat = total(ss_pre_all_debt_banintsty_n1_sd)
{txt}
{com}. egen med_treat = median(total_treat)
{txt}
{com}. gen high_total_treat = total_treat > med_treat
{txt}
{com}. 
. collapse (sum) borr_loan, by(high_total_treat year)
{res}{txt}
{com}. 
. tsset high_total_treat year
{res}
{col 1}{txt:Panel variable: }{res:high_total_treat}{txt: (strongly balanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:2009}}{txt: to }{res:{bind:2021}}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. replace borr_loan    = borr_loan/1e3
{txt}(26 real changes made)

{com}. tssmooth ma borr_loan_ma = borr_loan, window(2 1)
{txt}The smoother applied was
{res}{p 5 5 5} by high_total_treat : (1/3)*[x(t-2) + x(t-1) + 1*x(t)]; x(t)= borr_loan{p_end}
{txt}Note: Missing values are given a weight of zero in the smoother.

{com}. 
. gen borr_loan_ma_2010 = borr_loan_ma if year == 2010
{txt}(24 missing values generated)

{com}. bys high_total_treat (borr_loan_ma_2010): replace borr_loan_ma_2010 = borr_loan_ma_2010[1]
{txt}(24 real changes made)

{com}. 
. gen borr_loan_ma_s10 = borr_loan_ma / borr_loan_ma_2010
{txt}
{com}. label var borr_loan_ma_s10 "Scaled Aggregate Coal Lending"
{txt}
{com}. 
. sort high_total_treat year
{txt}
{com}. save "../Intermediate/Figure_6", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/Figure_6.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/Figure_6.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. include "../Data_Cleaning/Analysis_Cumulative_Effects_on_Debt.do" //Prepare Figure 7
{txt}
{com}. 
. use "../Intermediate/analysis_panel_firmyear", clear
{txt}
{com}. sort borrower_id year
{txt}
{com}. tsset borrower_id year
{res}
{col 1}{txt:Panel variable: }{res:borrower_id}{txt: (weakly balanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:2009}}{txt: to }{res:{bind:2021}}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. 
. gen cum_debt = 0 if year==2009
{txt}(5,088 missing values generated)

{com}. replace cum_debt = borr_debt if year==2010
{txt}(424 real changes made)

{com}. bys borrower_id: replace cum_debt = cum_debt[_n-1] + borr_debt if year>2010
{txt}(4664 real changes made)

{com}. gen log_cum_debt = log(1 + cum_debt)
{txt}
{com}. 
. bys borrower_id: egen total_treat = total(ss_pre_all_debt_banintsty_n1_sd)
{txt}
{com}. gen high_total_treat = total_treat > 6.60333
{txt}
{com}. 
. save ../Intermediate/Figure_7, replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/Figure_7.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/Figure_7.dta{rm}
saved
{p_end}

{com}. {txt}
{com}. include "../Data_Cleaning/Analysis_Counterfactual_Simulation.do" //Prepare Figure 8 
{txt}
{com}. 
. //load IPCC scenario data 
. use ../Intermediate/ipcc_scenarios_data, clear
{txt}
{com}. drop Region Model
{txt}
{com}. 
. gen scen = "_current" if Scenario == "NGFS2_Current Policies"
{txt}(106 missing values generated)

{com}. replace scen = "_below2c" if Scenario == "CO_Bridge" 
{txt}(106 real changes made)

{com}. drop Scenario 
{txt}
{com}. drop  primaryenergy_coal_EJyr
{txt}
{com}. rename secondaryenergy_elec_coal_EJyr coal_elec_EJ 
{res}{txt}
{com}. rename kyoto_gases_Mt_CO2eyr total_emissions_Mt_CO2eyr
{res}{txt}
{com}. 
. //convert coal electricity to CO2e Emssions
. gen coal_emissions_Mt_CO2eyr = coal_elec_EJ*0.228*1000
{txt}(25 missing values generated)

{com}. keep scen year coal_emissions_Mt_CO2eyr coal_power_capacity_GW
{txt}
{com}. reshape wide coal_*, i(year) j(scen) string
{txt}(j = _below2c _current)

Data{col 36}Long{col 43}->{col 48}Wide
{hline 77}
Number of observations     {res}         212   {txt}->   {res}106         
{txt}Number of variables        {res}           4   {txt}->   {res}5           
{txt}j variable (2 values)              {res}scen   {txt}->   (dropped)
xij variables:
                 {res}coal_power_capacity_GW   {txt}->   {res}coal_power_capacity_GW_below2c coal_power_capacity_GW_current
               coal_emissions_Mt_CO2eyr   {txt}->   {res}coal_emissions_Mt_CO2eyr_below2c coal_emissions_Mt_CO2eyr_current
{txt}{hline 77}

{com}. tempfile ipcc 
{txt}
{com}. save `ipcc'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.00002x{rm}
saved
as .dta format
{p_end}

{com}. 
. clear
{txt}
{com}. set obs 91
{txt}{p}
Number of observations ({bf:_N}) was 0,
now 91.
{p_end}

{com}. gen year = 2010+_n-1
{txt}
{com}. tempfile time 
{txt}
{com}. save `time'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000030{rm}
saved
as .dta format
{p_end}

{com}. 
. 
. //get hazard model sample to understand the overal plant level treatment effect
. use ../Intermediate/plant_year_panel_clean, clear
{txt}
{com}. stset year, failure(retired) id(plant_parent_id) origin(EstYr) 

{txt}Survival-time data settings

{col 12}ID variable: {res}plant_parent_id
{col 10}{txt}Failure event: {res}retired!=0 & retired<.
{col 1}{txt}Observed time interval: {res}(year[_n-1], year]
{col 6}{txt}Exit on or before: {res}failure
{col 6}{txt}Time for analysis: {res}(time-origin)
{col 17}{txt}Origin: {res}time EstYr

{txt}{hline 74}
{res}     53,534{txt}  total observations
{res}     10,504{txt}  ignored because never entered
{res}      6,653{txt}  observations end on or before {bf:enter()}
{res}      7,009{txt}  observations begin on or after (first) failure
{hline 74}
{res}     29,368{txt}  observations remaining, representing
{res}      3,141{txt}  subjects
{res}      1,019{txt}  failures in single-failure-per-subject data
{res}     99,143{txt}  total analysis time at risk and under observation
                                                At risk from t = {res}        0
                                     {txt}Earliest observed entry t = {res}        0
                                          {txt}Last observed exit t = {res}       74
{txt}
{com}. stcox c.post2015##c.ban_intensity_max_sd, strata(country_i) vce(cl ParentID_GCEL)

{col 9}{txt}Failure {bf:_d}: {res}retired
{col 3}{txt}Analysis time {bf:_t}: {res}(year-origin)
{col 13}{txt}Origin: {res}time EstYr
{col 8}{txt}ID variable: {res}plant_parent_id

{txt}Iteration 0:  Log pseudolikelihood = {res}-4761.5393
{txt}Iteration 1:  Log pseudolikelihood = {res}-4700.5503
{txt}Iteration 2:  Log pseudolikelihood = {res}-4699.1615
{txt}Iteration 3:  Log pseudolikelihood = {res}-4699.1614
{txt}Refining estimates:
Iteration 0:  Log pseudolikelihood = {res}-4699.1614

{txt}Stratified Cox regression with Breslow method for ties
Strata variable: {res:country_i}

No. of subjects = {res}{ralign 6:3,141}{col 57}{txt}{lalign 13:Number of obs} = {res}{ralign 6:29,368}
{txt}No. of failures = {res}{ralign 6:1,019}
{txt}Time at risk    = {res}{ralign 6:99,143}
{col 57}{txt}{lalign 13:Wald chi2({res:3})} = {res}{ralign 6:38.87}
{txt}Log pseudolikelihood = {res}-4699.1614{col 57}{txt}{lalign 13:Prob > chi2} = {res}{ralign 6:0.0000}

{txt}{ralign 99:(Std. err. adjusted for {res:215} clusters in {res:ParentID_GCEL})}
{hline 34}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 35}{c |}{col 47}    Robust
{col 1}                               _t{col 35}{c |} Haz. ratio{col 47}   std. err.{col 59}      z{col 67}   P>|z|{col 75}     [95% con{col 88}f. interval]
{hline 34}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 25}post2015 {c |}{col 35}{res}{space 2} 1.964263{col 47}{space 2} .4795825{col 58}{space 1}    2.77{col 67}{space 3}0.006{col 75}{space 4} 1.217238{col 88}{space 3} 3.169742
{txt}{space 13}ban_intensity_max_sd {c |}{col 35}{res}{space 2} .9871625{col 47}{space 2} .1356331{col 58}{space 1}   -0.09{col 67}{space 3}0.925{col 75}{space 4} .7541125{col 88}{space 3} 1.292234
{txt}{space 33} {c |}
c.post2015#c.ban_intensity_max_sd {c |}{col 35}{res}{space 2} 1.132665{col 47}{space 2} .1821571{col 58}{space 1}    0.77{col 67}{space 3}0.439{col 75}{space 4} .8264374{col 88}{space 3} 1.552363
{txt}{hline 34}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. gen insamp = e(sample) == 1
{txt}
{com}. egen plant_in_cox_samp = max(insamp), by(TrackerID)
{txt}
{com}. keep TrackerID ban_intensity_max_sd plant_in_cox_samp 
{txt}
{com}. collapse (mean) ban_intensity_max_sd, by(TrackerID plant_in_cox_samp)
{res}{txt}
{com}. duplicates drop

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(0 observations are duplicates)

{com}. tempfile coxsamp 
{txt}
{com}. save `coxsamp'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000031{rm}
saved
as .dta format
{p_end}

{com}. 
. use "../Intermediate/gcpt_clean.dta", clear
{txt}
{com}. 
. unique TrackerID // unique plant identifier 
{txt}Number of unique values of TrackerID is  {res}13745
{txt}Number of records is  {res}13745
{txt}
{com}. 
. gen ever_operated = ~missing(first_date_Operating)
{txt}
{com}. replace ever_operated = 0 if missing(EstYr) & inlist(most_recent_status_2022,"Cancelled","Construction")
{txt}(16 real changes made)

{com}. replace ever_operated = 0 if ~inlist(most_recent_status_2022,"Operating","Retired","Mothballed")
{txt}(686 real changes made)

{com}. 
. 
. gen EstYr_imputed = EstYr if EstYr <= 2022
{txt}(4,232 missing values generated)

{com}. egen EstYr_location = mean(EstYr_imputed), by(TrackerLOC)
{txt}(2,885 missing values generated)

{com}. replace EstYr_location = floor(EstYr_location)
{txt}(6,560 real changes made)

{com}. replace EstYr_imputed = EstYr_location if missing(EstYr) & ever_operated == 1
{txt}(62 real changes made)

{com}. mdesc EstYr_imputed if ever_operated == 1

{txt}    Variable{col 17}{c |}     Missing          Total     Percent Missing
{hline 16}{c +}{hline 47}
   EstYr_impu~d{col 17}{c |} {res}        115          9,396           1.22
{txt}{hline 16}{c +}{hline 47}

{com}. egen EstYr_province = mean(EstYr_imputed), by(PlantProvince)
{txt}(525 missing values generated)

{com}. replace EstYr_province = floor(EstYr_province)
{txt}(12,260 real changes made)

{com}. replace EstYr_imputed = EstYr_province if missing(EstYr_imputed) & ever_operated == 1
{txt}(108 real changes made)

{com}. mdesc EstYr_imputed if ever_operated == 1

{txt}    Variable{col 17}{c |}     Missing          Total     Percent Missing
{hline 16}{c +}{hline 47}
   EstYr_impu~d{col 17}{c |} {res}          7          9,396           0.07
{txt}{hline 16}{c +}{hline 47}

{com}. replace EstYr_imputed = EstYr if missing(EstYr_imputed) & ever_operated == 0
{txt}(392 real changes made)

{com}. gen future_plants = EstYr_imputed >= 2023 & ~missing(EstYr_imputed) & ~inlist(most_recent_status_2022,"Cancelled","Shelved","Retired")
{txt}
{com}. 
. 
. //GENERATE SAMPLE OF PLANTS ACTIVE AS OF OR AFTER 2010
. keep if (ever_operated == 1 & EstYr_imputed <= 2022 & inlist(most_recent_status_2022,"Operating","Retired","Mothballed")) | future_plants == 1
{txt}(4,124 observations deleted)

{com}. 
. 
. //survival analysis
. gen dox = RetiredYr
{txt}(6,988 missing values generated)

{com}. replace dox = 2022 if missing(RetiredYr)
{txt}(6,988 real changes made)

{com}. gen retired = ~missing(RetiredYr)
{txt}
{com}. gen entered = max(EstYr_imputed,2014) 
{txt}
{com}. stset dox, failure(retired) enter(time entered) origin(time EstYr_imputed)

{txt}Survival-time data settings

{col 10}Failure event: {res}retired!=0 & retired<.
{col 1}{txt}Observed time interval: {res}(origin, dox]
{col 6}{txt}Enter on or after: {res}time entered
{col 6}{txt}Exit on or before: {res}failure
{col 6}{txt}Time for analysis: {res}(time-origin)
{col 17}{txt}Origin: {res}time EstYr_imputed

{txt}{hline 74}
{res}      9,621{txt}  total observations
{res}      1,568{txt}  observations end on or before {bf:enter()}
{hline 74}
{res}      8,053{txt}  observations remaining, representing
{res}      1,397{txt}  failures in single-record/single-failure data
{res}     54,614{txt}  total analysis time at risk and under observation
                                                At risk from t = {res}        0
                                     {txt}Earliest observed entry t = {res}        0
                                          {txt}Last observed exit t = {res}       81
{txt}
{com}. encode PlantCountry, gen(country_i)
{txt}
{com}. 
. preserve
{txt}
{com}. drop if future_plants == 1
{txt}(232 observations deleted)

{com}. sts graph, name(KMsurv, replace)

{col 10}{txt}Failure {bf:_d}: {res}retired
{col 4}{txt}Analysis time {bf:_t}: {res}(dox-origin)
{col 14}{txt}Origin: {res}time EstYr_imputed
{col 3}{txt}Enter on or after: {res}time entered
{txt}
{com}. sts generate surv_km = s
{txt}
{com}. streg, distribution(weibull)

{col 10}{txt}Failure {bf:_d}: {res}retired
{col 4}{txt}Analysis time {bf:_t}: {res}(dox-origin)
{col 14}{txt}Origin: {res}time EstYr_imputed
{col 3}{txt}Enter on or after: {res}time entered

{txt}Fitting constant-only model:
Iteration 0:  Log likelihood = {res}-1649.4424
{txt}Iteration 1:  Log likelihood = {res} -1088.806
{txt}Iteration 2:  Log likelihood = {res}-1070.4926
{txt}Iteration 3:  Log likelihood = {res}-1070.4466
{txt}Iteration 4:  Log likelihood = {res}-1070.4466

{txt}Fitting full model:
{res}{txt}Iteration 0:{space 2}Log likelihood = {res:-1070.4466}  
{res}
{txt}Weibull PH regression

No. of subjects = {res}{ralign 6:8,053}{col 57}{txt}{lalign 13:Number of obs} = {res}{ralign 6:8,053}
{txt}No. of failures = {res}{ralign 6:1,397}
{txt}Time at risk    = {res}{ralign 6:54,614}
{col 57}{txt}{lalign 13:LR chi2({res:0})} = {res}{ralign 6:0.00}
{txt}Log likelihood = {res}-1070.4466{col 57}{txt}{lalign 13:Prob > chi2} = {res}{ralign 6:.}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}          _t{col 14}{c |}     Hazard{col 26}   Std. err.{col 38}      z{col 46}   P>|z|{col 54}     [95% con{col 67}f. interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}_cons {c |}{col 14}{res}{space 2} .0002642{col 26}{space 2} .0000457{col 37}{space 1}  -47.64{col 46}{space 3}0.000{col 54}{space 4} .0001882{col 67}{space 3} .0003707
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}/ln_p {c |}{col 14}{res}{space 2} .7903837{col 26}{space 2} .0196806{col 37}{space 1}   40.16{col 46}{space 3}0.000{col 54}{space 4} .7518105{col 67}{space 3}  .828957
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
           p {c |}{col 14}{res}{space 2} 2.204242{col 26}{space 2} .0433808{col 54}{space 4} 2.120836{col 67}{space 3} 2.290928
{txt}         1/p {c |}{col 14}{res}{space 2} .4536707{col 26}{space 2} .0089285{col 54}{space 4} .4365043{col 67}{space 3} .4715121
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. keep surv_km _t 
{txt}
{com}. duplicates drop 

{p 0 4}{txt}Duplicates in terms of {txt} all variables{p_end}

(9,310 observations deleted)

{com}. tempfile km 
{txt}
{com}. save `km'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000033{rm}
saved
as .dta format
{p_end}

{com}. clear
{txt}
{com}. set obs 81
{txt}{p}
Number of observations ({bf:_N}) was 0,
now 81.
{p_end}

{com}. gen t0 = 0
{txt}
{com}. gen t = _n 
{txt}
{com}. gen st = 1
{txt}
{com}. gen d = 1
{txt}
{com}. stset t, failure(d) 

{txt}Survival-time data settings

{col 10}Failure event: {res}d!=0 & d<.
{col 1}{txt}Observed time interval: {res}(0, t]
{col 6}{txt}Exit on or before: {res}failure

{txt}{hline 74}
{res}         81{txt}  total observations
{res}          0{txt}  exclusions
{hline 74}
{res}         81{txt}  observations remaining, representing
{res}         81{txt}  failures in single-record/single-failure data
{res}      3,321{txt}  total analysis time at risk and under observation
                                                At risk from t = {res}        0
                                     {txt}Earliest observed entry t = {res}        0
                                          {txt}Last observed exit t = {res}       81
{txt}
{com}. predict surv_weibull, surv
{txt}
{com}. predict haz_weibull, haz
{txt}
{com}. merge 1:1 _t using `km', keep(1 3)
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               3
{txt}{col 9}from master{col 30}{res}               3{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}              78{txt}  (_merge==3)
{col 5}{hline 41}

{com}. line surv_weibull surv_km _t, scheme(white_tableau) ///
>                                                           xtitle("Plant Age") ///
>                                                       legend(pos(6) cols(2) order(2 "Kaplan-Meier Survival Estimate" 1 "Weibull Model Fit"))
{res}{txt}
{com}. 
. 
. //hazard rate 
. keep surv_weibull haz_weibull _t 
{txt}
{com}. rename _t t
{res}{txt}
{com}. tempfile weibull 
{txt}
{com}. save `weibull'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000034{rm}
saved
as .dta format
{p_end}

{com}. restore
{txt}
{com}. 
. merge 1:1 TrackerID using `coxsamp', keep(1 3) nogen
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}           6,496
{txt}{col 9}from master{col 30}{res}           6,496{txt}  
{col 9}from using{col 30}{res}               0{txt}  

{col 5}Matched{col 30}{res}           3,125{txt}  
{col 5}{hline 41}

{com}. gen ban_intensity = ban_intensity_max_sd
{txt}(6,496 missing values generated)

{com}. replace ban_intensity = 0 if missing(ban_intensity_max_sd)
{txt}(6,496 real changes made)

{com}. 
. keep TrackerID EstYr_imputed future_plants RetiredYr CapacityMW Subregion Coaltype HeatrateBtuperkWh Capacityfactor AnnualCO2milliontonnesann Remainingplantlifetimeyears PlantCountry
{txt}
{com}. rename EstYr_imputed EstYr 
{res}{txt}
{com}. order TrackerID EstYr RetiredYr
{txt}
{com}. 
. local haz_mult_nopol  = 1/exp(0.366*0.497)  //multiply baseline hazard by this to get no policy hazard 
{txt}
{com}. local haz_mult_bigpol = exp(0.366*1.729)/exp(0.366*0.497)  //multiply baseline hazard by this to get bigger policy hazard
{txt}
{com}. 
. 
. //make panel from 2010
. cross using `time'
{txt}
{com}. order year 
{txt}
{com}. 
. egen plantid = group(TrackerID)
{txt}
{com}. tsset plantid year
{res}
{col 1}{txt:Panel variable: }{res:plantid}{txt: (strongly balanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:2010}}{txt: to }{res:{bind:2100}}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. gen retired = year>=RetiredYr
{txt}
{com}. gen entered = max(2014,EstYr)
{txt}
{com}. gen exit = min(RetiredYr,2022)
{txt}
{com}. stset year, failure(retired) id(plantid) origin(time EstYr) enter(time entered) exit(time exit)

{txt}Survival-time data settings

{col 12}ID variable: {res}plantid
{col 10}{txt}Failure event: {res}retired!=0 & retired<.
{col 1}{txt}Observed time interval: {res}(year[_n-1], year]
{col 6}{txt}Enter on or after: {res}time entered
{col 6}{txt}Exit on or before: {res}time exit
{col 6}{txt}Time for analysis: {res}(time-origin)
{col 17}{txt}Origin: {res}time EstYr

{txt}{hline 74}
{res}    875,511{txt}  total observations
{res}     55,672{txt}  observations end on or before {bf:enter()}
{res}    765,225{txt}  observations begin on or after exit
{hline 74}
{res}     54,614{txt}  observations remaining, representing
{res}      8,053{txt}  subjects
{res}      1,397{txt}  failures in single-failure-per-subject data
{res}     54,614{txt}  total analysis time at risk and under observation
                                                At risk from t = {res}        0
                                     {txt}Earliest observed entry t = {res}        0
                                          {txt}Last observed exit t = {res}       81
{txt}
{com}. gen t = year - EstYr  //negative years means plant was not yet established
{txt}
{com}. merge m:1 t using `weibull'
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}         259,232
{txt}{col 9}from master{col 30}{res}         259,232{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}         616,279{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. 
. tsset plantid year
{res}
{col 1}{txt:Panel variable: }{res:plantid}{txt: (strongly balanced)}
{p 1 16 2}{txt:Time variable: }{res:year}{txt:, }{res:{bind:2010}}{txt: to }{res:{bind:2100}}{p_end}
{txt}{col 10}Delta: {res}1 unit
{txt}
{com}. 
. //actual data
. gen data_operating = year < RetiredYr & year >= EstYr
{txt}
{com}. gen data_retired = year >= RetiredYr 
{txt}
{com}. 
. //use data for operating status before 2015 or through plant establishment
. gen baseline_p_alive = data_operating if year <= max(EstYr,2015)
{txt}(811,812 missing values generated)

{com}. replace baseline_p_alive = 0 if year > 2015 & RetiredYr <= 2015 //already retired plants stay retired
{txt}(123,675 real changes made)

{com}. //after 2015 or estyear, start applying hazard
. bys plantid (year): replace baseline_p_alive = baseline_p_alive[_n-1]*(1-haz_weibull) if year > max(EstYr,2015)
{txt}(581860 real changes made, 66926 to missing)

{com}. 
. gen nopolicy_p_alive = data_operating if year <= max(EstYr,2015)
{txt}(811,812 missing values generated)

{com}. replace nopolicy_p_alive = 0 if year > 2015 & RetiredYr <= 2015 //already retired plants stay retired
{txt}(123,675 real changes made)

{com}. //after 2015 or estyear, start applying hazard
. gen haz_nopol = haz_weibull*`haz_mult_nopol'
{txt}(259,232 missing values generated)

{com}. bys plantid (year): replace nopolicy_p_alive = nopolicy_p_alive[_n-1]*(1-haz_nopol) if year > max(EstYr,2015)
{txt}(581860 real changes made, 66926 to missing)

{com}. 
. 
. gen bigpol_p_alive = data_operating if year <= max(EstYr,2015)
{txt}(811,812 missing values generated)

{com}. replace bigpol_p_alive = 0 if year > 2015 & RetiredYr <= 2015 //already retired plants stay retired
{txt}(123,675 real changes made)

{com}. //after 2015 or estyear, start applying hazard
. gen haz_bigpol = haz_weibull*`haz_mult_bigpol'
{txt}(259,232 missing values generated)

{com}. bys plantid (year): replace bigpol_p_alive = bigpol_p_alive[_n-1]*(1-haz_bigpol) if year > max(EstYr,2015)
{txt}(581860 real changes made, 66926 to missing)

{com}. 
. //make a COAL emissions over time plot 
. gen data_co2eGT = data_operating*AnnualCO2milliontonnesann/1e3
{txt}(9,919 missing values generated)

{com}. gen baseline_co2eGT = baseline_p_alive*AnnualCO2milliontonnesann/1e3
{txt}(248,474 missing values generated)

{com}. gen nopolicy_co2eGT = nopolicy_p_alive*AnnualCO2milliontonnesann/1e3
{txt}(248,474 missing values generated)

{com}. gen bigpolicy_co2eGT = bigpol_p_alive*AnnualCO2milliontonnesann/1e3
{txt}(248,474 missing values generated)

{com}. 
. gen data_capacityGW = data_operating*CapacityMW/1e3
{txt}
{com}. gen baseline_capacityGW = baseline_p_alive*CapacityMW/1e3
{txt}(240,129 missing values generated)

{com}. gen nopolicy_capacityGW = nopolicy_p_alive*CapacityMW/1e3
{txt}(240,129 missing values generated)

{com}. 
. //make GE EMISSIONS PLOT 
. tempfile pre_collapse 
{txt}
{com}. save `pre_collapse'
{txt}{p 0 4 2}
file {bf}
/var/folders/b3/396jh0bj4tg2k96f7rpnpgdw0000gq/T//S_50709.000035{rm}
saved
as .dta format
{p_end}

{com}. 
. use `pre_collapse', clear
{txt}
{com}. collapse (sum) CapacityMW data_co2eGT baseline_co2eGT nopolicy_co2eGT bigpolicy_co2eGT *_capacityGW, by(year)
{res}{txt}
{com}. label var nopolicy_co2eGT "No Policies"
{txt}
{com}. label var baseline_co2eGT "Current Policies"
{txt}
{com}. label var bigpolicy_co2eGT "Expanded Policies"
{txt}
{com}. 
. label var nopolicy_capacityGW "No Policies"
{txt}
{com}. label var baseline_capacityGW "Current Policies"
{txt}
{com}. 
. label var year ""
{txt}
{com}. 
. merge 1:1 year using `ipcc'
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}              15
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}              15{txt}  (_merge==2)

{col 5}Matched{col 30}{res}              91{txt}  (_merge==3)
{col 5}{hline 41}

{com}. drop if year < 2010
{txt}(15 observations deleted)

{com}. drop _merge
{txt}
{com}. gen zero = 0
{txt}
{com}. 
. gen below2c_coal_co2eGT = coal_emissions_Mt_CO2eyr_below2c/1000
{txt}
{com}. gen bau_coal_co2eGT = coal_emissions_Mt_CO2eyr_current/1000
{txt}
{com}. 
. label var below2c_coal_co2eGT "Below 2C Target"
{txt}
{com}. label var bau_coal_co2eGT "IPCC Current Path"
{txt}
{com}. 
. save "../Intermediate/Figure_8", replace
{txt}{p 0 4 2}
(file {bf}
../Intermediate/Figure_8.dta{rm}
not found)
{p_end}
{p 0 4 2}
file {bf}
../Intermediate/Figure_8.dta{rm}
saved
{p_end}

{com}.  
. 
. 
. {txt}
{com}. include Main_Figures.do
{txt}
{com}. 
. 
. 
. ********************************************************************************
. ********************************************************************************
. * Figure 1: Number of Banks with Active Coal Exit Policies
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/Figure_1_Data", clear
{txt}
{com}. 
. graph twoway line cumulative qdate, connect(step) xline(223) xaxis(1 2) xlabel(210(4)244, axis(1)) ///
> xlabel(223 "Paris Accords adopted", axis(2)) ///
> lcolor(navy) ///
> ytitle("Number of Banks") ///
> xtitle("Year") xtitle("", axis(2))
{res}{txt}
{com}. 
. graph export "../Results/Graphs/Figure_1.pdf", replace
{txt}{p 0 4 2}
file {bf}
/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results/../Results/Graphs/Figure_1.pdf{rm}
saved as
PDF
format
{p_end}

{com}. 
. ********************************************************************************
. ********************************************************************************
. * Figure 3: Bank Exit Policies By Activity Type
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/Figure_3", clear
{txt}
{com}. 
. local power lcolor(dkorange) 
{txt}
{com}. local corpn lp(dash) 
{txt}
{com}. local projn lp(solid)
{txt}
{com}. local proje lp(dash_dot)
{txt}
{com}. local mining lcolor( maroon ) 
{txt}
{com}. 
. local common scheme(white_tableau) legend( ///
>        order(- "Power" - "Mining" 1 "Project Finance; New" 2 "Project Finance; New" 3 "Project Finance; Expansion" ///
>        4 "Project Finance; Expansion" 5 "Corporate Finance" 6 "Corporate Finance") symxsize(8) size(small) ///
>        colgap(small) keygap(small) cols(2) pos(6)) ///
>        ytitle("Percent of Banks Banning (%)") xtitle("Year") 
{txt}
{com}.        
. 
. graph twoway line pct_ban year if scenario == 101, `power' `projn'  || ///
>              line pct_ban year if scenario == 104, `mining' `projn' || ///
>              line pct_ban year if scenario == 102, `power' `proje'|| ///
>              line pct_ban year if scenario == 105, `mining' `proje' || ///       
>              line pct_ban year if scenario == 103, `power' `corpn'|| ///
>              line pct_ban year if scenario == 106, `mining'`corpn' `common'
{res}{txt}
{com}. 
. graph export "../Results/Graphs/Figure_3.pdf", replace
{txt}{p 0 4 2}
file {bf}
/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results/../Results/Graphs/Figure_3.pdf{rm}
saved as
PDF
format
{p_end}

{com}. 
. 
. ********************************************************************************
. ********************************************************************************
. * Figure 4: Heterogeneity in Exit Policy Strength
. ********************************************************************************
. ********************************************************************************
. use ../Intermediate/bank_lending_panel, clear           
{txt}
{com}. 
. twoway histogram ban_intensity_new1_max  if year==2020 &  ban_intensity_new1_max>0 , fraction bin(12) graphregion(color(white)) bgcolor(white) legend(off)  scheme(white_tableau) aspectratio(0.65) xtitle("Max Strength") ytitle("Fraction of Banks")         
{res}{txt}
{com}. graph export "../Results/Graphs/Figure_4.pdf", replace
{txt}{p 0 4 2}
file {bf}
/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results/../Results/Graphs/Figure_4.pdf{rm}
saved as
PDF
format
{p_end}

{com}. 
. ********************************************************************************
. ********************************************************************************
. * Figure 5: Aggregate Loan Issuance by Bank Exit Policy Strength
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/Figure_5", clear
{txt}
{com}. twoway  (line loan_ma_sc year if grp == 0) ///
>         (line loan_ma_sc year if grp == 1)  if year >= 2010, legend(lab(1 "No or Weak Policy") lab(2 "Strong Policy"))  ///
>         xtitle("") scheme(white_tableau) name(loan_ma_str, replace) scale(1.3) xsize(9) 
{res}{txt}
{com}.                 
. graph export "../Results/Graphs/Figure_5.pdf", replace
{txt}{p 0 4 2}
file {bf}
/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results/../Results/Graphs/Figure_5.pdf{rm}
saved as
PDF
format
{p_end}

{com}. 
.  
.  
. ********************************************************************************
. ********************************************************************************
. * Figure 6: Aggregate Loan Issuance by Borrower Treatment
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/Figure_6", clear
{txt}
{com}.  
.  twoway  (line borr_loan_ma_s10 year if high_total_treat == 0) ///
>         (line borr_loan_ma_s10 year if high_total_treat== 1)  if year >= 2010, legend(lab(1 "Non Treated or Low Treated") lab(2 "High Treated"))  ///
>         xtitle("") scheme(white_tableau) name(Borrowing_Ma, replace) scale(1.3) xsize(9) 
{res}{txt}
{com}.                 
. graph export "../Results/Graphs/Figure_6.pdf", replace
{txt}{p 0 4 2}
file {bf}
/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results/../Results/Graphs/Figure_6.pdf{rm}
saved as
PDF
format
{p_end}

{com}. 
. 
. ********************************************************************************
. ********************************************************************************
. * Figure 7: Cumulative Effects on Firm Debt Issuance
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/Figure_7", clear
{txt}
{com}. 
. reghdfe log_cum_debt i.year##i.high_total_treat if aggborr_pre_debt > 0 & Country ~= "xChina" & year>2009, absorb(borrower_id year) cl(borrower_id)
{res}{txt}note: {res}2011bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2012bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2013bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2014bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2015bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2016bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2017bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2018bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2019bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2020bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}2021bn.year{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}note: {res}1bn.high_total_treat{txt} is probably collinear with the fixed effects (all partialled-out values are close to zero; tol = 1.0e-09)
{txt}({browse "http://scorreia.com/research/hdfe.pdf":MWFE estimator} converged in 2 iterations)
{res}{txt}note: 2011.year omitted because of collinearity
{txt}note: 2012.year omitted because of collinearity
{txt}note: 2013.year omitted because of collinearity
{txt}note: 2014.year omitted because of collinearity
{txt}note: 2015.year omitted because of collinearity
{txt}note: 2016.year omitted because of collinearity
{txt}note: 2017.year omitted because of collinearity
{txt}note: 2018.year omitted because of collinearity
{txt}note: 2019.year omitted because of collinearity
{txt}note: 2020.year omitted because of collinearity
{txt}note: 2021.year omitted because of collinearity
{txt}note: 1.high_total_treat omitted because of collinearity
{res}
{txt}HDFE Linear regression{col 51}Number of obs{col 67}= {res}     3,384
{txt}Absorbing 2 HDFE groups{col 51}F({res}  11{txt},{res}    281{txt}){col 67}= {res}      1.72
{txt}Statistics robust to heteroskedasticity{col 51}Prob > F{col 67}= {res}    0.0677
{txt}{col 51}R-squared{col 67}= {res}    0.7440
{txt}{col 51}Adj R-squared{col 67}= {res}    0.7187
{txt}{col 51}Within R-sq.{col 67}= {res}    0.0040
{txt}{col 1}Number of clusters ({res}borrower_id{txt}) {col 30}= {res}       282{txt}{col 51}Root MSE{col 67}= {res}    2.3848

{txt}{ralign 87:(Std. err. adjusted for {res:282} clusters in {res:borrower_id})}
{hline 22}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 23}{c |}{col 35}    Robust
{col 1}         log_cum_debt{col 23}{c |} Coefficient{col 35}  std. err.{col 47}      t{col 55}   P>|t|{col 63}     [95% con{col 76}f. interval]
{hline 22}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 17}year {c |}
{space 16}2011  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2012  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2013  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2014  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2015  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2016  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2017  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2018  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2019  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2020  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 16}2021  {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 21} {c |}
{space 3}1.high_total_treat {c |}{col 23}{res}{space 2}        0{col 35}{txt}  (omitted)
{space 21} {c |}
year#high_total_treat {c |}
{space 14}2011 1  {c |}{col 23}{res}{space 2}-.4919026{col 35}{space 2} .5927596{col 46}{space 1}   -0.83{col 55}{space 3}0.407{col 63}{space 4}-1.658715{col 76}{space 3} .6749103
{txt}{space 14}2012 1  {c |}{col 23}{res}{space 2}-.0122573{col 35}{space 2} .6794549{col 46}{space 1}   -0.02{col 55}{space 3}0.986{col 63}{space 4}-1.349725{col 76}{space 3}  1.32521
{txt}{space 14}2013 1  {c |}{col 23}{res}{space 2}-.2651643{col 35}{space 2} .6890168{col 46}{space 1}   -0.38{col 55}{space 3}0.701{col 63}{space 4}-1.621454{col 76}{space 3} 1.091125
{txt}{space 14}2014 1  {c |}{col 23}{res}{space 2}-.4432715{col 35}{space 2} .6872279{col 46}{space 1}   -0.65{col 55}{space 3}0.519{col 63}{space 4} -1.79604{col 76}{space 3} .9094969
{txt}{space 14}2015 1  {c |}{col 23}{res}{space 2}-.4746887{col 35}{space 2} .6926208{col 46}{space 1}   -0.69{col 55}{space 3}0.494{col 63}{space 4}-1.838073{col 76}{space 3} .8886953
{txt}{space 14}2016 1  {c |}{col 23}{res}{space 2}-.5559401{col 35}{space 2} .6922663{col 46}{space 1}   -0.80{col 55}{space 3}0.423{col 63}{space 4}-1.918626{col 76}{space 3}  .806746
{txt}{space 14}2017 1  {c |}{col 23}{res}{space 2}-.7371138{col 35}{space 2} .6982023{col 46}{space 1}   -1.06{col 55}{space 3}0.292{col 63}{space 4}-2.111485{col 76}{space 3}  .637257
{txt}{space 14}2018 1  {c |}{col 23}{res}{space 2}-.9081392{col 35}{space 2} .6983928{col 46}{space 1}   -1.30{col 55}{space 3}0.195{col 63}{space 4}-2.282885{col 76}{space 3} .4666066
{txt}{space 14}2019 1  {c |}{col 23}{res}{space 2}-.8278776{col 35}{space 2} .6949634{col 46}{space 1}   -1.19{col 55}{space 3}0.235{col 63}{space 4}-2.195873{col 76}{space 3} .5401175
{txt}{space 14}2020 1  {c |}{col 23}{res}{space 2}-.7949117{col 35}{space 2} .6979939{col 46}{space 1}   -1.14{col 55}{space 3}0.256{col 63}{space 4}-2.168872{col 76}{space 3} .5790488
{txt}{space 14}2021 1  {c |}{col 23}{res}{space 2}-.8038454{col 35}{space 2} .6973688{col 46}{space 1}   -1.15{col 55}{space 3}0.250{col 63}{space 4}-2.176576{col 76}{space 3} .5688847
{txt}{space 21} {c |}
{space 16}_cons {c |}{col 23}{res}{space 2} 11.81476{col 35}{space 2} .2231803{col 46}{space 1}   52.94{col 55}{space 3}0.000{col 63}{space 4} 11.37544{col 76}{space 3} 12.25408
{txt}{hline 22}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{txt}Absorbed degrees of freedom:
{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 12}{hline 14}{hline 1}{c TRC}
{col 1}{text} Absorbed FE{col 14}{c |} Categories{col 27} - Redundant{col 39}  = Num. Coefs{col 54}{c |}
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 14}{hline 1}{c RT}
{col 1}{text} borrower_id{col 14}{c |}{space 1}      282{col 27}{space 1}      282{col 39}{result}{space 1}        0{col 53}{text}*{col 54}{c |}
{res}{col 1}{text}        year{col 14}{c |}{space 1}       12{col 27}{space 1}        0{col 39}{result}{space 1}       12{col 53}{text} {col 54}{c |}
{res}{col 1}{text}{hline 13}{c BT}{hline 12}{hline 12}{hline 14}{hline 1}{c BRC}
* = FE nested within cluster; treated as redundant for DoF computation
{res}{txt}
{com}. coefplot, vertical  drop(_cons) xlabel(1 "2011" 2 "2012" 3 "2013" 4 "2014" 5 "2015" 6 "2016" 7 "2017" 8 "2018" 9 "2019" 10 "2020" 11 "2021" ) levels(90) graphregion(color(white)) scheme(white_tableau)
{res}{txt}
{com}. graph export "../Results/Graphs/Figure_7.pdf", replace  
{txt}{p 0 4 2}
file {bf}
/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results/../Results/Graphs/Figure_7.pdf{rm}
saved as
PDF
format
{p_end}

{com}. 
. ********************************************************************************
. ********************************************************************************
. * Figure 8: Cumulative Effects on Firm Debt Issuance
. ********************************************************************************
. ********************************************************************************
. use "../Intermediate/Figure_8", clear
{txt}
{com}. 
. sum baseline_co2eGT if year == 2010

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
baseline_c~T {c |}{res}          1      7.9467           .     7.9467     7.9467
{txt}
{com}. local base2010 = `r(mean)'
{txt}
{com}. sum below2c_coal_co2eGT if year == 2010

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
below2c_co~T {c |}{res}          1    7.081603           .   7.081603   7.081603
{txt}
{com}. local 2c2010 = `r(mean)'
{txt}
{com}. 
. local maxyear 2100
{txt}
{com}. 
. twoway (rarea baseline_co2eGT nopolicy_co2eGT year if year>=2010 & year <= `maxyear', fcolor(brown%50) lwidth(0)) ///
>        (rarea zero baseline_co2eGT year if year>=2010 & year <= `maxyear', lwidth(0) fcolor(gs10%25)) ///
>        (line nopolicy_co2eGT year if year <= `maxyear', lcolor(brown) lpattern(shortdash)) ///
>        (line bigpolicy_co2eGT year  if year <= `maxyear', lcolor(green) lpattern(shortdash)) ///
>        (line baseline_co2eGT year  if year <= `maxyear', lcolor(black)) /// 
>        (line below2c_coal_co2eGT year if year >= 2020 & year <= `maxyear'), /// 
>        scheme(white_tableau) legend(order(3 5 4 6) cols(4) pos(6)) ytitle("Coal Powerplant Emissions (GT CO2e)") xtitle("") ///
>        xticks(2010(10)`maxyear') xlabel(2010(10)`maxyear') name(with_future, replace)
{res}{txt}
{com}. graph export "../Results/Graphs/counterfactual_co2.pdf", replace
{txt}{p 0 4 2}
file {bf}
/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Code_Main_Results/../Results/Graphs/counterfactual_co2.pdf{rm}
saved as
PDF
format
{p_end}

{com}. 
. 
. 
. {txt}
{com}. 
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/jblume/Documents/GitHub/coal_finance/Accepted_Paper_Submission/Code_Replication_Package/Log_Book/Full_Code_With_Psedo_Data.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}29 May 2025, 11:47:41
{txt}{.-}
{smcl}
{txt}{sf}{ul off}